Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-04-09 16:34:28 +0400
committerDenys Vlasenko <vda.linux@googlemail.com>2010-04-09 16:34:28 +0400
commit125d0154e6c591addbaf1fae7c9ffdf5b7e7ed7b (patch)
treed447fcdf0cefef523bc26d1de800f3db7e00dad9 /libbb/info_msg.c
parente69ad87802139b7b62fc06ff5d5d09cc4245d5fc (diff)
Exclude syslog code if FEATURE_SYSLOG is not set
syslog.h and syslog(...) may not exist in such configuration Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/info_msg.c')
-rw-r--r--libbb/info_msg.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libbb/info_msg.c b/libbb/info_msg.c
index bc9d23b95..81164faa0 100644
--- a/libbb/info_msg.c
+++ b/libbb/info_msg.c
@@ -8,7 +8,9 @@
*/
#include "libbb.h"
-#include <syslog.h>
+#if ENABLE_FEATURE_SYSLOG
+# include <syslog.h>
+#endif
void FAST_FUNC bb_info_msg(const char *s, ...)
{
@@ -24,8 +26,10 @@ void FAST_FUNC bb_info_msg(const char *s, ...)
vprintf(s, p);
fputs(msg_eol, stdout);
}
- if (ENABLE_FEATURE_SYSLOG && (logmode & LOGMODE_SYSLOG))
+# if ENABLE_FEATURE_SYSLOG
+ if (logmode & LOGMODE_SYSLOG)
vsyslog(LOG_INFO, s, p2);
+# endif
va_end(p2);
va_end(p);
#else
@@ -42,8 +46,10 @@ void FAST_FUNC bb_info_msg(const char *s, ...)
if (used < 0)
return;
- if (ENABLE_FEATURE_SYSLOG && (logmode & LOGMODE_SYSLOG))
+# if ENABLE_FEATURE_SYSLOG
+ if (logmode & LOGMODE_SYSLOG)
syslog(LOG_INFO, "%s", msg);
+# endif
if (logmode & LOGMODE_STDIO) {
fflush_all();
/* used = strlen(msg); - must be true already */