[systemd-devel] [PATCH 4/7] journal: honour !HAVE_UTMP

Emil Renner Berthing systemd at esmil.dk
Wed Sep 24 08:25:03 PDT 2014


---
 src/journal/journald-wall.c | 5 ++++-
 src/journal/journald-wall.h | 6 ++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/journal/journald-wall.c b/src/journal/journald-wall.c
index fcbd918..360b3bd 100644
--- a/src/journal/journald-wall.c
+++ b/src/journal/journald-wall.c
@@ -19,10 +19,12 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "utmp-wtmp.h"
 #include "journald-server.h"
 #include "journald-wall.h"
 
+#ifdef HAVE_UTMP
+#include "utmp-wtmp.h"
+
 void server_forward_wall(
                 Server *s,
                 int priority,
@@ -67,3 +69,4 @@ void server_forward_wall(
         if (r < 0)
                 log_debug("Failed to send wall message: %s", strerror(-r));
 }
+#endif
diff --git a/src/journal/journald-wall.h b/src/journal/journald-wall.h
index 93c3cec..b3cffd6 100644
--- a/src/journal/journald-wall.h
+++ b/src/journal/journald-wall.h
@@ -23,4 +23,10 @@
 
 #include "journald-server.h"
 
+#ifdef HAVE_UTMP
 void server_forward_wall(Server *s, int priority, const char *identifier, const char *message, struct ucred *ucred);
+#else
+static inline void server_forward_wall(Server *s,
+                int priority, const char *identifier,
+                const char *message, struct ucred *ucred) {}
+#endif
-- 
2.1.0



More information about the systemd-devel mailing list