diff options
-rw-r--r-- | init/init.c | 2 | ||||
-rw-r--r-- | libbb/info_msg.c | 2 | ||||
-rw-r--r-- | libbb/verror_msg.c | 2 | ||||
-rw-r--r-- | loginutils/login.c | 2 | ||||
-rw-r--r-- | loginutils/passwd.c | 1 | ||||
-rw-r--r-- | loginutils/sulogin.c | 3 | ||||
-rw-r--r-- | miscutils/crond.c | 2 | ||||
-rw-r--r-- | miscutils/devfsd.c | 11 | ||||
-rw-r--r-- | networking/dnsd.c | 2 | ||||
-rw-r--r-- | networking/isrv_identd.c | 2 | ||||
-rw-r--r-- | networking/libiproute/iprule.c | 1 | ||||
-rw-r--r-- | networking/telnetd.c | 3 | ||||
-rw-r--r-- | networking/zcip.c | 4 | ||||
-rw-r--r-- | sysklogd/klogd.c | 2 | ||||
-rw-r--r-- | sysklogd/logger.c | 42 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 10 | ||||
-rw-r--r-- | util-linux/mount.c | 2 |
17 files changed, 42 insertions, 51 deletions
diff --git a/init/init.c b/init/init.c index f7eb8f34b..513ff340c 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -10,9 +10,9 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "libbb.h" | 12 | #include "libbb.h" |
13 | #include <syslog.h> | ||
13 | #include <paths.h> | 14 | #include <paths.h> |
14 | #include <sys/reboot.h> | 15 | #include <sys/reboot.h> |
15 | #include <sys/syslog.h> | ||
16 | 16 | ||
17 | #define INIT_BUFFS_SIZE 256 | 17 | #define INIT_BUFFS_SIZE 256 |
18 | #define CONSOLE_NAME_SIZE 32 | 18 | #define CONSOLE_NAME_SIZE 32 |
diff --git a/libbb/info_msg.c b/libbb/info_msg.c index b0ce64338..3231bc8cf 100644 --- a/libbb/info_msg.c +++ b/libbb/info_msg.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <syslog.h> | ||
11 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | #include <syslog.h> | ||
12 | 12 | ||
13 | void bb_info_msg(const char *s, ...) | 13 | void bb_info_msg(const char *s, ...) |
14 | { | 14 | { |
diff --git a/libbb/verror_msg.c b/libbb/verror_msg.c index dbd8323e4..ca44030b2 100644 --- a/libbb/verror_msg.c +++ b/libbb/verror_msg.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <syslog.h> | ||
11 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | #include <syslog.h> | ||
12 | 12 | ||
13 | smallint logmode = LOGMODE_STDIO; | 13 | smallint logmode = LOGMODE_STDIO; |
14 | const char *msg_eol = "\n"; | 14 | const char *msg_eol = "\n"; |
diff --git a/loginutils/login.c b/loginutils/login.c index 7e9044654..55cbfa7cd 100644 --- a/loginutils/login.c +++ b/loginutils/login.c | |||
@@ -4,9 +4,9 @@ | |||
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "libbb.h" | 6 | #include "libbb.h" |
7 | #include <syslog.h> | ||
7 | #include <utmp.h> | 8 | #include <utmp.h> |
8 | #include <sys/resource.h> | 9 | #include <sys/resource.h> |
9 | #include <syslog.h> | ||
10 | 10 | ||
11 | #if ENABLE_SELINUX | 11 | #if ENABLE_SELINUX |
12 | #include <selinux/selinux.h> /* for is_selinux_enabled() */ | 12 | #include <selinux/selinux.h> /* for is_selinux_enabled() */ |
diff --git a/loginutils/passwd.c b/loginutils/passwd.c index 0842b71bf..0df084e5a 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c | |||
@@ -6,7 +6,6 @@ | |||
6 | #include "libbb.h" | 6 | #include "libbb.h" |
7 | #include <syslog.h> | 7 | #include <syslog.h> |
8 | 8 | ||
9 | |||
10 | static void nuke_str(char *str) | 9 | static void nuke_str(char *str) |
11 | { | 10 | { |
12 | if (str) memset(str, 0, strlen(str)); | 11 | if (str) memset(str, 0, strlen(str)); |
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index af457ef1e..faa93eaea 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c | |||
@@ -5,9 +5,8 @@ | |||
5 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <syslog.h> | ||
9 | |||
10 | #include "libbb.h" | 8 | #include "libbb.h" |
9 | #include <syslog.h> | ||
11 | 10 | ||
12 | //static void catchalarm(int ATTRIBUTE_UNUSED junk) | 11 | //static void catchalarm(int ATTRIBUTE_UNUSED junk) |
13 | //{ | 12 | //{ |
diff --git a/miscutils/crond.c b/miscutils/crond.c index fd20e6a57..0df143ae7 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
@@ -11,8 +11,8 @@ | |||
11 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 11 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <sys/syslog.h> | ||
15 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | #include <syslog.h> | ||
16 | 16 | ||
17 | #ifndef CRONTABS | 17 | #ifndef CRONTABS |
18 | #define CRONTABS "/var/spool/cron/crontabs" | 18 | #define CRONTABS "/var/spool/cron/crontabs" |
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 9990142c2..52a65bc98 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -53,17 +53,12 @@ | |||
53 | The postal address is: | 53 | The postal address is: |
54 | Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. | 54 | Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. |
55 | */ | 55 | */ |
56 | |||
57 | //#include <sys/wait.h> | ||
58 | //#include <sys/ioctl.h> | ||
59 | //#include <sys/socket.h> | ||
60 | #include <sys/un.h> | ||
61 | #include <dirent.h> | ||
62 | #include <syslog.h> | ||
63 | #include <sys/sysmacros.h> | ||
64 | #include "libbb.h" | 56 | #include "libbb.h" |
65 | #include "xregex.h" | 57 | #include "xregex.h" |
58 | #include <syslog.h> | ||
66 | 59 | ||
60 | #include <sys/un.h> | ||
61 | #include <sys/sysmacros.h> | ||
67 | 62 | ||
68 | /* Various defines taken from linux/major.h */ | 63 | /* Various defines taken from linux/major.h */ |
69 | #define IDE0_MAJOR 3 | 64 | #define IDE0_MAJOR 3 |
diff --git a/networking/dnsd.c b/networking/dnsd.c index 8f01d5c06..19720d6bc 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
@@ -17,8 +17,8 @@ | |||
17 | * the first porting of oao' scdns to busybox also. | 17 | * the first porting of oao' scdns to busybox also. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <syslog.h> | ||
21 | #include "libbb.h" | 20 | #include "libbb.h" |
21 | #include <syslog.h> | ||
22 | 22 | ||
23 | //#define DEBUG 1 | 23 | //#define DEBUG 1 |
24 | #define DEBUG 0 | 24 | #define DEBUG 0 |
diff --git a/networking/isrv_identd.c b/networking/isrv_identd.c index a93de1244..dbdecba24 100644 --- a/networking/isrv_identd.c +++ b/networking/isrv_identd.c | |||
@@ -7,8 +7,8 @@ | |||
7 | * Licensed under GPL version 2, see file LICENSE in this tarball for details. | 7 | * Licensed under GPL version 2, see file LICENSE in this tarball for details. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <syslog.h> | ||
11 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | #include <syslog.h> | ||
12 | #include "isrv.h" | 12 | #include "isrv.h" |
13 | 13 | ||
14 | enum { TIMEOUT = 20 }; | 14 | enum { TIMEOUT = 20 }; |
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c index 6b22061a7..3f9007ee9 100644 --- a/networking/libiproute/iprule.c +++ b/networking/libiproute/iprule.c | |||
@@ -16,7 +16,6 @@ | |||
16 | * initially integrated into busybox by Bernhard Fischer | 16 | * initially integrated into busybox by Bernhard Fischer |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <syslog.h> | ||
20 | #include <netinet/in.h> | 19 | #include <netinet/in.h> |
21 | #include <netinet/ip.h> | 20 | #include <netinet/ip.h> |
22 | #include <arpa/inet.h> | 21 | #include <arpa/inet.h> |
diff --git a/networking/telnetd.c b/networking/telnetd.c index 0201d2636..962e5cc7b 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c | |||
@@ -24,14 +24,13 @@ | |||
24 | #define DEBUG 0 | 24 | #define DEBUG 0 |
25 | 25 | ||
26 | #include "libbb.h" | 26 | #include "libbb.h" |
27 | #include <syslog.h> | ||
27 | 28 | ||
28 | #if DEBUG | 29 | #if DEBUG |
29 | #define TELCMDS | 30 | #define TELCMDS |
30 | #define TELOPTS | 31 | #define TELOPTS |
31 | #endif | 32 | #endif |
32 | #include <arpa/telnet.h> | 33 | #include <arpa/telnet.h> |
33 | #include <sys/syslog.h> | ||
34 | |||
35 | 34 | ||
36 | /* Structure that describes a session */ | 35 | /* Structure that describes a session */ |
37 | struct tsession { | 36 | struct tsession { |
diff --git a/networking/zcip.c b/networking/zcip.c index ef9aa2186..6e1c0d148 100644 --- a/networking/zcip.c +++ b/networking/zcip.c | |||
@@ -23,9 +23,6 @@ | |||
23 | // - avoid silent script failures, especially under load... | 23 | // - avoid silent script failures, especially under load... |
24 | // - link status monitoring (restart on link-up; stop on link-down) | 24 | // - link status monitoring (restart on link-up; stop on link-down) |
25 | 25 | ||
26 | #include <syslog.h> | ||
27 | #include <poll.h> | ||
28 | #include <sys/wait.h> | ||
29 | #include <netinet/ether.h> | 26 | #include <netinet/ether.h> |
30 | #include <net/ethernet.h> | 27 | #include <net/ethernet.h> |
31 | #include <net/if.h> | 28 | #include <net/if.h> |
@@ -34,6 +31,7 @@ | |||
34 | #include <linux/sockios.h> | 31 | #include <linux/sockios.h> |
35 | 32 | ||
36 | #include "libbb.h" | 33 | #include "libbb.h" |
34 | #include <syslog.h> | ||
37 | 35 | ||
38 | /* We don't need more than 32 bits of the counter */ | 36 | /* We don't need more than 32 bits of the counter */ |
39 | #define MONOTONIC_US() ((unsigned)monotonic_us()) | 37 | #define MONOTONIC_US() ((unsigned)monotonic_us()) |
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index 72f3b559c..d65b6f9a0 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c | |||
@@ -18,7 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include "libbb.h" | 20 | #include "libbb.h" |
21 | #include <sys/syslog.h> | 21 | #include <syslog.h> |
22 | #include <sys/klog.h> | 22 | #include <sys/klog.h> |
23 | 23 | ||
24 | static void klogd_signal(int sig ATTRIBUTE_UNUSED) | 24 | static void klogd_signal(int sig ATTRIBUTE_UNUSED) |
diff --git a/sysklogd/logger.c b/sysklogd/logger.c index 970b05dc6..090750173 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c | |||
@@ -8,28 +8,32 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | 11 | #ifndef CONFIG_SYSLOGD | |
12 | #if !defined CONFIG_SYSLOGD | ||
13 | |||
14 | /* SYSLOG_NAMES defined to pull prioritynames[] and facilitynames[] | ||
15 | * from syslog.h. Grrrr - glibc puts those in _rwdata_! :( */ | ||
16 | #define SYSLOG_NAMES | 12 | #define SYSLOG_NAMES |
17 | #define SYSLOG_NAMES_CONST /* uclibc is saner :) */ | 13 | #define SYSLOG_NAMES_CONST |
18 | #include <sys/syslog.h> | 14 | #include <syslog.h> |
19 | |||
20 | #else | 15 | #else |
21 | #include <sys/syslog.h> | 16 | /* brokenness alert. Everybody except dietlibc get's this wrong by neither |
22 | # ifndef __dietlibc__ | 17 | * providing a typedef nor an extern for facilitynames and prioritynames |
23 | /* We have to do this since the header file defines static | 18 | * in syslog.h. |
24 | * structures. Argh.... bad libc, bad, bad... | 19 | */ |
25 | */ | 20 | # include <syslog.h> |
26 | typedef struct _code { | 21 | # ifndef __dietlibc__ |
27 | char *c_name; | 22 | /* We have to do this since the header file does neither provide a sane type |
28 | int c_val; | 23 | * for this structure nor extern definitions. Argh.... bad libc, bad, bad... |
29 | } CODE; | 24 | */ |
30 | extern CODE prioritynames[]; | 25 | typedef struct _code { |
31 | extern CODE facilitynames[]; | 26 | char *c_name; /* FIXME: this should be const char *const c_name ! */ |
27 | int c_val; | ||
28 | } CODE; | ||
29 | # ifdef __UCLIBC__ | ||
30 | extern const CODE prioritynames[]; | ||
31 | extern const CODE facilitynames[]; | ||
32 | # else | ||
33 | extern CODE prioritynames[]; | ||
34 | extern CODE facilitynames[]; | ||
32 | # endif | 35 | # endif |
36 | # endif | ||
33 | #endif | 37 | #endif |
34 | 38 | ||
35 | /* Decode a symbolic name to a numeric value | 39 | /* Decode a symbolic name to a numeric value |
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 345bf0e87..de8aa04a8 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -14,14 +14,12 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "libbb.h" | 16 | #include "libbb.h" |
17 | #define SYSLOG_NAMES | ||
18 | #define SYSLOG_NAMES_CONST | ||
19 | #include <syslog.h> | ||
20 | |||
17 | #include <paths.h> | 21 | #include <paths.h> |
18 | #include <sys/un.h> | 22 | #include <sys/un.h> |
19 | |||
20 | /* SYSLOG_NAMES defined to pull prioritynames[] and facilitynames[] | ||
21 | * from syslog.h. Grrrr - glibc puts those in _rwdata_! :( */ | ||
22 | #define SYSLOG_NAMES | ||
23 | #define SYSLOG_NAMES_CONST /* uclibc is saner :) */ | ||
24 | #include <sys/syslog.h> | ||
25 | #include <sys/uio.h> | 23 | #include <sys/uio.h> |
26 | 24 | ||
27 | #if ENABLE_FEATURE_REMOTE_LOG | 25 | #if ENABLE_FEATURE_REMOTE_LOG |
diff --git a/util-linux/mount.c b/util-linux/mount.c index abf5cd03f..a10d28d7c 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -20,9 +20,9 @@ | |||
20 | 20 | ||
21 | #include <mntent.h> | 21 | #include <mntent.h> |
22 | #include "libbb.h" | 22 | #include "libbb.h" |
23 | #include <syslog.h> | ||
23 | 24 | ||
24 | /* Needed for nfs support only... */ | 25 | /* Needed for nfs support only... */ |
25 | #include <syslog.h> | ||
26 | #include <sys/utsname.h> | 26 | #include <sys/utsname.h> |
27 | #undef TRUE | 27 | #undef TRUE |
28 | #undef FALSE | 28 | #undef FALSE |