summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2017-10-17 02:08:20 +0200
committerYann Ylavic <ylavic@apache.org>2017-10-17 02:08:20 +0200
commit28d4b317686fba2e667fb700df378c98e0276841 (patch)
tree5e1121b5f35fe0c72c4af4cbea2518d43ba70f57
parentFix format pattern (%lu => %APR_SIZE_T_FMT). (diff)
downloadapache2-28d4b317686fba2e667fb700df378c98e0276841.tar.xz
apache2-28d4b317686fba2e667fb700df378c98e0276841.zip
mod_journald: work around possible use of "inline" keyword in systemd #include.
This fails to compile before c99, override with APR_INLINE. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1812339 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/loggers/mod_journald.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/modules/loggers/mod_journald.c b/modules/loggers/mod_journald.c
index 002017eae6..6b4ced30a8 100644
--- a/modules/loggers/mod_journald.c
+++ b/modules/loggers/mod_journald.c
@@ -30,14 +30,22 @@
#include "mpm_common.h"
#include "mod_log_config.h"
-#define SD_JOURNAL_SUPPRESS_LOCATION 1
-
-#include "systemd/sd-journal.h"
-
#if APR_HAVE_UNISTD_H
#include <unistd.h>
#endif
+/* XXX: keep this after any other #include.
+ * Some systemd versions use the "inline" keyword which is not
+ * c89/c90 compliant, so override it...
+ */
+#if defined(__STDC__) && (!defined(__STDC_VERSION__) \
+ || __STDC_VERSION__ < 199901L)
+#undef inline
+#define inline APR_INLINE
+#endif
+#define SD_JOURNAL_SUPPRESS_LOCATION 1
+#include <systemd/sd-journal.h>
+
#define MAX_ENTRIES 15
static int journald_info_get_priority(int level)