From 565424b2fd11ce6bcb57b0afcc9484813162bb5e Mon Sep 17 00:00:00 2001 From: Rui Paulo Date: Wed, 13 Oct 2010 16:57:06 +0000 Subject: [PATCH] Clang related fixes: * When calling syslog(), pass a format string. * Define YY_NO_INPUT on nslexer.l Submitted by: Norberto Lopes --- lib/libc/net/nslexer.l | 1 + lib/libc/sys/stack_protector.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/net/nslexer.l b/lib/libc/net/nslexer.l index 34c79d92596..0f705cf72dc 100644 --- a/lib/libc/net/nslexer.l +++ b/lib/libc/net/nslexer.l @@ -53,6 +53,7 @@ static char *rcsid = #include "nsparser.h" +#define YY_NO_INPUT #define YY_NO_UNPUT %} diff --git a/lib/libc/sys/stack_protector.c b/lib/libc/sys/stack_protector.c index 14e991e3a05..ed7d6352337 100644 --- a/lib/libc/sys/stack_protector.c +++ b/lib/libc/sys/stack_protector.c @@ -92,7 +92,7 @@ __fail(const char *msg) (void)sigprocmask(SIG_BLOCK, &mask, NULL); /* This may fail on a chroot jail... */ - syslog(LOG_CRIT, msg); + syslog(LOG_CRIT, "%s", msg); (void)memset(&sa, 0, sizeof(sa)); (void)sigemptyset(&sa.sa_mask);