X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fsyslog.h;h=a9468d4d43cc4ffc9cfeb5758eccd9bba6acfeba;hp=7fc9232a647402fef2584607b64868dc4523053c;hb=43653c1250ad5eb5385d7e08292ad047420f8d25;hpb=b5b43b6d6245efac10cd0d2b6d23ee8f91d75261 diff --git a/include/syslog.h b/include/syslog.h index 7fc9232a..a9468d4d 100644 --- a/include/syslog.h +++ b/include/syslog.h @@ -1,10 +1,12 @@ -#ifndef _SYS_SYSLOG_H -#define _SYS_SYSLOG_H +#ifndef _SYSLOG_H +#define _SYSLOG_H #ifdef __cplusplus extern "C" { #endif +#include + #define LOG_EMERG 0 #define LOG_ALERT 1 #define LOG_CRIT 2 @@ -59,9 +61,12 @@ void openlog (const char *, int, int); int setlogmask (int); void syslog (int, const char *, ...); -#if defined(_GNU_SOURCE) && defined(SYSLOG_NAMES) +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define _PATH_LOG "/dev/log" #define __NEED_va_list #include +void vsyslog (int, const char *, va_list); +#if defined(SYSLOG_NAMES) #define INTERNAL_NOPRI 0x10 #define INTERNAL_MARK (LOG_NFACILITIES<<3) struct __CODE { @@ -89,7 +94,7 @@ typedef struct { { "local2", LOG_LOCAL2 }, { "local3", LOG_LOCAL3 }, \ { "local4", LOG_LOCAL4 }, { "local5", LOG_LOCAL5 }, \ { "local6", LOG_LOCAL6 }, { "local7", LOG_LOCAL7 }, { NULL, -1 } }) -void vsyslog (int, const char *, va_list); +#endif #endif #ifdef __cplusplus