summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--klogd.c1
-rw-r--r--rsyslog.h8
3 files changed, 10 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index fa8d93f8..ff8587af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AC_CONFIG_HEADER([config.h])
AC_PROG_CC
AM_PROG_CC_C_O
if test "$GCC" = "yes"
-then CFLAGS="$CFLAGS -W -Wall -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
+then CFLAGS="$CFLAGS -W -Wall -Wformat-security -Wshadow -Wcast-align -Wpointer-arith -Wmissing-format-attribute -g"
fi
AC_CANONICAL_HOST
diff --git a/klogd.c b/klogd.c
index 5b9025f1..909bc6f8 100644
--- a/klogd.c
+++ b/klogd.c
@@ -334,6 +334,7 @@ static void LogProcLine(void);
extern int main(int argc, char *argv[]);
+extern void Syslog(int priority, char *fmt, ...) __attribute__((format(printf,2, 3)));
extern void Syslog(int priority, char *fmt, ...)
{
va_list ap;
diff --git a/rsyslog.h b/rsyslog.h
index 2c3449ab..1f633059 100644
--- a/rsyslog.h
+++ b/rsyslog.h
@@ -94,4 +94,12 @@ typedef enum rsObjectID rsObjID;
*/
typedef unsigned char uchar;
+/* for the time being, we do our own portability handling here. It
+ * looks like autotools either does not yet support checks for it, or
+ * I wasn't smart enough to find them ;) rgerhards, 2007-07-18
+ */
+#ifndef __GNUC__
+# define __attribute__(x) /*NOTHING*/
+#endif
+
#endif /* multi-include protection */