diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-31 22:42:12 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-31 22:42:12 +0000 |
commit | 9a7d38fe2448617df98ecaea7dbe6f3131088586 (patch) | |
tree | 5966d651dcb5588e24106791f9cd3647f358112b | |
parent | fad2b86c9e7eaadb973b50a1bc0e2accc1a96cfd (diff) | |
download | busybox-w32-9a7d38fe2448617df98ecaea7dbe6f3131088586.tar.gz busybox-w32-9a7d38fe2448617df98ecaea7dbe6f3131088586.tar.bz2 busybox-w32-9a7d38fe2448617df98ecaea7dbe6f3131088586.zip |
delete tons of extra #includes
59 files changed, 68 insertions, 176 deletions
diff --git a/archival/cpio.c b/archival/cpio.c index 6d1ee166d..72d31c35d 100644 --- a/archival/cpio.c +++ b/archival/cpio.c | |||
@@ -11,20 +11,16 @@ | |||
11 | * Only supports new ASCII and CRC formats | 11 | * Only supports new ASCII and CRC formats |
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | #include <fcntl.h> | ||
15 | #include <stdlib.h> | ||
16 | #include <string.h> | ||
17 | #include <unistd.h> | ||
18 | #include "unarchive.h" | ||
19 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | #include "unarchive.h" | ||
20 | 16 | ||
21 | #define CPIO_OPT_EXTRACT 0x01 | 17 | #define CPIO_OPT_EXTRACT 0x01 |
22 | #define CPIO_OPT_TEST 0x02 | 18 | #define CPIO_OPT_TEST 0x02 |
23 | #define CPIO_OPT_UNCONDITIONAL 0x04 | 19 | #define CPIO_OPT_UNCONDITIONAL 0x04 |
24 | #define CPIO_OPT_VERBOSE 0x08 | 20 | #define CPIO_OPT_VERBOSE 0x08 |
25 | #define CPIO_OPT_FILE 0x10 | 21 | #define CPIO_OPT_FILE 0x10 |
26 | #define CPIO_OPT_CREATE_LEADING_DIR 0x20 | 22 | #define CPIO_OPT_CREATE_LEADING_DIR 0x20 |
27 | #define CPIO_OPT_PRESERVE_MTIME 0x40 | 23 | #define CPIO_OPT_PRESERVE_MTIME 0x40 |
28 | 24 | ||
29 | int cpio_main(int argc, char **argv); | 25 | int cpio_main(int argc, char **argv); |
30 | int cpio_main(int argc, char **argv) | 26 | int cpio_main(int argc, char **argv) |
diff --git a/archival/libunarchive/archive_xread_all_eof.c b/archival/libunarchive/archive_xread_all_eof.c index 007f68c6d..7e082ab1d 100644 --- a/archival/libunarchive/archive_xread_all_eof.c +++ b/archival/libunarchive/archive_xread_all_eof.c | |||
@@ -3,8 +3,8 @@ | |||
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "unarchive.h" | ||
7 | #include "libbb.h" | 6 | #include "libbb.h" |
7 | #include "unarchive.h" | ||
8 | 8 | ||
9 | ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, | 9 | ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, |
10 | unsigned char *buf, size_t count) | 10 | unsigned char *buf, size_t count) |
diff --git a/archival/libunarchive/data_align.c b/archival/libunarchive/data_align.c index 946c94d0d..9803199e0 100644 --- a/archival/libunarchive/data_align.c +++ b/archival/libunarchive/data_align.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <sys/types.h> | 6 | //#include <sys/types.h> |
7 | 7 | ||
8 | #include "libbb.h" | 8 | #include "libbb.h" |
9 | #include "unarchive.h" | 9 | #include "unarchive.h" |
diff --git a/archival/libunarchive/data_extract_to_stdout.c b/archival/libunarchive/data_extract_to_stdout.c index d87a4a595..c8895ed65 100644 --- a/archival/libunarchive/data_extract_to_stdout.c +++ b/archival/libunarchive/data_extract_to_stdout.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "libbb.h" | ||
6 | #include "unarchive.h" | 7 | #include "unarchive.h" |
7 | 8 | ||
8 | void data_extract_to_stdout(archive_handle_t *archive_handle) | 9 | void data_extract_to_stdout(archive_handle_t *archive_handle) |
diff --git a/archival/libunarchive/decompress_uncompress.c b/archival/libunarchive/decompress_uncompress.c index a1d7fd67c..ba73f1132 100644 --- a/archival/libunarchive/decompress_uncompress.c +++ b/archival/libunarchive/decompress_uncompress.c | |||
@@ -26,9 +26,6 @@ | |||
26 | * [... History snipped ...] | 26 | * [... History snipped ...] |
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | #include <stdio.h> | ||
30 | #include <string.h> | ||
31 | #include <unistd.h> | ||
32 | 29 | ||
33 | /* Default input buffer size */ | 30 | /* Default input buffer size */ |
34 | #define IBUFSIZ 2048 | 31 | #define IBUFSIZ 2048 |
diff --git a/archival/libunarchive/filter_accept_all.c b/archival/libunarchive/filter_accept_all.c index 5c991cac4..47d771e43 100644 --- a/archival/libunarchive/filter_accept_all.c +++ b/archival/libunarchive/filter_accept_all.c | |||
@@ -5,7 +5,7 @@ | |||
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 <stdlib.h> | 8 | #include "libbb.h" |
9 | #include "unarchive.h" | 9 | #include "unarchive.h" |
10 | 10 | ||
11 | /* Accept any non-null name, its not really a filter at all */ | 11 | /* Accept any non-null name, its not really a filter at all */ |
diff --git a/archival/libunarchive/filter_accept_list.c b/archival/libunarchive/filter_accept_list.c index cfc1b0c58..6e571ad4e 100644 --- a/archival/libunarchive/filter_accept_list.c +++ b/archival/libunarchive/filter_accept_list.c | |||
@@ -5,7 +5,7 @@ | |||
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 <stdlib.h> | 8 | #include "libbb.h" |
9 | #include "unarchive.h" | 9 | #include "unarchive.h" |
10 | 10 | ||
11 | /* | 11 | /* |
diff --git a/archival/libunarchive/filter_accept_reject_list.c b/archival/libunarchive/filter_accept_reject_list.c index 79da350b6..bf983b5e8 100644 --- a/archival/libunarchive/filter_accept_reject_list.c +++ b/archival/libunarchive/filter_accept_reject_list.c | |||
@@ -5,7 +5,7 @@ | |||
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 <stdlib.h> | 8 | #include "libbb.h" |
9 | #include "unarchive.h" | 9 | #include "unarchive.h" |
10 | 10 | ||
11 | /* | 11 | /* |
diff --git a/archival/libunarchive/find_list_entry.c b/archival/libunarchive/find_list_entry.c index d1afc72ce..f2741039d 100644 --- a/archival/libunarchive/find_list_entry.c +++ b/archival/libunarchive/find_list_entry.c | |||
@@ -6,7 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <fnmatch.h> | 8 | #include <fnmatch.h> |
9 | #include <stdlib.h> | 9 | #include "libbb.h" |
10 | #include "unarchive.h" | 10 | #include "unarchive.h" |
11 | 11 | ||
12 | /* Find a string in a shell pattern list */ | 12 | /* Find a string in a shell pattern list */ |
diff --git a/archival/libunarchive/get_header_tar_lzma.c b/archival/libunarchive/get_header_tar_lzma.c index 06b8daa0f..5c02767de 100644 --- a/archival/libunarchive/get_header_tar_lzma.c +++ b/archival/libunarchive/get_header_tar_lzma.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Licensed under GPL v2, see file LICENSE in this tarball for details. | 6 | * Licensed under GPL v2, see file LICENSE in this tarball for details. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "libbb.h" | ||
9 | #include "unarchive.h" | 10 | #include "unarchive.h" |
10 | 11 | ||
11 | char get_header_tar_lzma(archive_handle_t * archive_handle) | 12 | char get_header_tar_lzma(archive_handle_t * archive_handle) |
diff --git a/archival/libunarchive/header_list.c b/archival/libunarchive/header_list.c index fb461a68e..8cb8f40d9 100644 --- a/archival/libunarchive/header_list.c +++ b/archival/libunarchive/header_list.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ | 4 | */ |
5 | #include <stdio.h> | 5 | #include "libbb.h" |
6 | #include "unarchive.h" | 6 | #include "unarchive.h" |
7 | 7 | ||
8 | void header_list(const file_header_t *file_header) | 8 | void header_list(const file_header_t *file_header) |
diff --git a/archival/libunarchive/header_skip.c b/archival/libunarchive/header_skip.c index 53242e011..ef2172bb3 100644 --- a/archival/libunarchive/header_skip.c +++ b/archival/libunarchive/header_skip.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ | 4 | */ |
5 | #include <stdio.h> | 5 | #include "libbb.h" |
6 | #include "unarchive.h" | 6 | #include "unarchive.h" |
7 | 7 | ||
8 | void header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED) | 8 | void header_skip(const file_header_t *file_header ATTRIBUTE_UNUSED) |
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c index 58a89b918..0ee080621 100644 --- a/archival/libunarchive/open_transformer.c +++ b/archival/libunarchive/open_transformer.c | |||
@@ -3,11 +3,7 @@ | |||
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <stdlib.h> | ||
7 | #include <unistd.h> | ||
8 | |||
9 | #include "libbb.h" | 6 | #include "libbb.h" |
10 | |||
11 | #include "unarchive.h" | 7 | #include "unarchive.h" |
12 | 8 | ||
13 | /* transformer(), more than meets the eye */ | 9 | /* transformer(), more than meets the eye */ |
diff --git a/archival/libunarchive/seek_by_read.c b/archival/libunarchive/seek_by_read.c index e46af4842..452d82d10 100644 --- a/archival/libunarchive/seek_by_read.c +++ b/archival/libunarchive/seek_by_read.c | |||
@@ -3,10 +3,8 @@ | |||
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <stdlib.h> | ||
7 | |||
8 | #include "unarchive.h" | ||
9 | #include "libbb.h" | 6 | #include "libbb.h" |
7 | #include "unarchive.h" | ||
10 | 8 | ||
11 | /* If we are reading through a pipe(), or from stdin then we can't lseek, | 9 | /* If we are reading through a pipe(), or from stdin then we can't lseek, |
12 | * we must read and discard the data to skip over it. | 10 | * we must read and discard the data to skip over it. |
diff --git a/archival/libunarchive/unpack_ar_archive.c b/archival/libunarchive/unpack_ar_archive.c index 6a84ae811..fc1820b97 100644 --- a/archival/libunarchive/unpack_ar_archive.c +++ b/archival/libunarchive/unpack_ar_archive.c | |||
@@ -2,11 +2,9 @@ | |||
2 | /* | 2 | /* |
3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 3 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
4 | */ | 4 | */ |
5 | #include <fcntl.h> | 5 | |
6 | #include <stdlib.h> | ||
7 | #include <string.h> | ||
8 | #include "unarchive.h" | ||
9 | #include "libbb.h" | 6 | #include "libbb.h" |
7 | #include "unarchive.h" | ||
10 | 8 | ||
11 | void unpack_ar_archive(archive_handle_t *ar_archive) | 9 | void unpack_ar_archive(archive_handle_t *ar_archive) |
12 | { | 10 | { |
diff --git a/console-tools/clear.c b/console-tools/clear.c index 053293ce2..3c7d704b5 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c | |||
@@ -10,11 +10,8 @@ | |||
10 | 10 | ||
11 | /* no options, no getopt */ | 11 | /* no options, no getopt */ |
12 | 12 | ||
13 | #include <stdio.h> | ||
14 | #include <stdlib.h> | ||
15 | #include "libbb.h" | 13 | #include "libbb.h" |
16 | 14 | ||
17 | |||
18 | int clear_main(int argc, char **argv); | 15 | int clear_main(int argc, char **argv); |
19 | int clear_main(int argc, char **argv) | 16 | int clear_main(int argc, char **argv) |
20 | { | 17 | { |
diff --git a/console-tools/reset.c b/console-tools/reset.c index c844e1511..deffe286d 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c | |||
@@ -10,9 +10,6 @@ | |||
10 | 10 | ||
11 | /* no options, no getopt */ | 11 | /* no options, no getopt */ |
12 | 12 | ||
13 | #include <stdio.h> | ||
14 | #include <stdlib.h> | ||
15 | #include <unistd.h> | ||
16 | #include "libbb.h" | 13 | #include "libbb.h" |
17 | 14 | ||
18 | int reset_main(int argc, char **argv); | 15 | int reset_main(int argc, char **argv); |
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c index a0d291d30..0911ede50 100644 --- a/console-tools/setkeycodes.c +++ b/console-tools/setkeycodes.c | |||
@@ -9,10 +9,9 @@ | |||
9 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 9 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <sys/ioctl.h> | 12 | //#include <sys/ioctl.h> |
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | 14 | ||
15 | |||
16 | /* From <linux/kd.h> */ | 15 | /* From <linux/kd.h> */ |
17 | struct kbkeycode { | 16 | struct kbkeycode { |
18 | unsigned int scancode, keycode; | 17 | unsigned int scancode, keycode; |
diff --git a/coreutils/df.c b/coreutils/df.c index d455d27f6..82730806e 100644 --- a/coreutils/df.c +++ b/coreutils/df.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * the command line. Properly round *-blocks, Used, and Available quantities. | 18 | * the command line. Properly round *-blocks, Used, and Available quantities. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <stdio.h> | ||
22 | #include <stdlib.h> | ||
23 | #include <string.h> | ||
24 | #include <unistd.h> | ||
25 | #include <mntent.h> | 21 | #include <mntent.h> |
26 | #include <sys/vfs.h> | 22 | #include <sys/vfs.h> |
27 | #include "libbb.h" | 23 | #include "libbb.h" |
diff --git a/coreutils/id.c b/coreutils/id.c index 064bd29d9..9dd5b48d3 100644 --- a/coreutils/id.c +++ b/coreutils/id.c | |||
@@ -14,9 +14,6 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "libbb.h" | 16 | #include "libbb.h" |
17 | #include <stdio.h> | ||
18 | #include <unistd.h> | ||
19 | #include <sys/types.h> | ||
20 | 17 | ||
21 | #define PRINT_REAL 1 | 18 | #define PRINT_REAL 1 |
22 | #define NAME_NOT_NUMBER 2 | 19 | #define NAME_NOT_NUMBER 2 |
diff --git a/coreutils/libcoreutils/getopt_mk_fifo_nod.c b/coreutils/libcoreutils/getopt_mk_fifo_nod.c index 32fa9bede..5065c3886 100644 --- a/coreutils/libcoreutils/getopt_mk_fifo_nod.c +++ b/coreutils/libcoreutils/getopt_mk_fifo_nod.c | |||
@@ -20,11 +20,8 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <sys/types.h> | ||
24 | #include <sys/stat.h> | ||
25 | #include <unistd.h> | ||
26 | #include "libbb.h" | 23 | #include "libbb.h" |
27 | #include "coreutils.h" | 24 | //#include "coreutils.h" |
28 | 25 | ||
29 | mode_t getopt_mk_fifo_nod(int argc, char **argv) | 26 | mode_t getopt_mk_fifo_nod(int argc, char **argv) |
30 | { | 27 | { |
diff --git a/coreutils/printenv.c b/coreutils/printenv.c index 0e69ff217..2531d5a23 100644 --- a/coreutils/printenv.c +++ b/coreutils/printenv.c | |||
@@ -8,9 +8,6 @@ | |||
8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <stdio.h> | ||
12 | #include <string.h> | ||
13 | #include <stdlib.h> | ||
14 | #include "libbb.h" | 11 | #include "libbb.h" |
15 | extern char **environ; | 12 | extern char **environ; |
16 | 13 | ||
diff --git a/coreutils/uname.c b/coreutils/uname.c index d4188cdae..a934c15f4 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -30,12 +30,6 @@ | |||
30 | * Now does proper error checking on i/o. Plus some further space savings. | 30 | * Now does proper error checking on i/o. Plus some further space savings. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <stdio.h> | ||
34 | #include <stdlib.h> | ||
35 | #include <stddef.h> | ||
36 | #include <string.h> | ||
37 | #include <unistd.h> | ||
38 | #include <sys/types.h> | ||
39 | #include <sys/utsname.h> | 33 | #include <sys/utsname.h> |
40 | #include "libbb.h" | 34 | #include "libbb.h" |
41 | 35 | ||
diff --git a/debianutils/pipe_progress.c b/debianutils/pipe_progress.c index f95008493..ac8fb50f6 100644 --- a/debianutils/pipe_progress.c +++ b/debianutils/pipe_progress.c | |||
@@ -8,10 +8,6 @@ | |||
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include "libbb.h" | 10 | #include "libbb.h" |
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <unistd.h> | ||
14 | #include <time.h> | ||
15 | 11 | ||
16 | #define PIPE_PROGRESS_SIZE 4096 | 12 | #define PIPE_PROGRESS_SIZE 4096 |
17 | 13 | ||
diff --git a/include/unarchive.h b/include/unarchive.h index 8aa90becc..8b2da5646 100644 --- a/include/unarchive.h +++ b/include/unarchive.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define ARCHIVE_NOPRESERVE_OWN 32 | 10 | #define ARCHIVE_NOPRESERVE_OWN 32 |
11 | #define ARCHIVE_NOPRESERVE_PERM 64 | 11 | #define ARCHIVE_NOPRESERVE_PERM 64 |
12 | 12 | ||
13 | #include "libbb.h" | 13 | //#include "libbb.h" |
14 | 14 | ||
15 | typedef struct file_headers_s { | 15 | typedef struct file_headers_s { |
16 | char *name; | 16 | char *name; |
diff --git a/init/init.c b/init/init.c index 3dcd0726b..cb83b088d 100644 --- a/init/init.c +++ b/init/init.c | |||
@@ -11,9 +11,9 @@ | |||
11 | 11 | ||
12 | #include "libbb.h" | 12 | #include "libbb.h" |
13 | #include <paths.h> | 13 | #include <paths.h> |
14 | #include <signal.h> | 14 | //#include <signal.h> |
15 | #include <sys/ioctl.h> | 15 | //#include <sys/ioctl.h> |
16 | #include <sys/wait.h> | 16 | //#include <sys/wait.h> |
17 | #include <sys/reboot.h> | 17 | #include <sys/reboot.h> |
18 | 18 | ||
19 | #if ENABLE_FEATURE_INIT_SYSLOG | 19 | #if ENABLE_FEATURE_INIT_SYSLOG |
diff --git a/libbb/ask_confirmation.c b/libbb/ask_confirmation.c index 4642fa036..646ec4b7e 100644 --- a/libbb/ask_confirmation.c +++ b/libbb/ask_confirmation.c | |||
@@ -11,8 +11,6 @@ | |||
11 | * return 1. Otherwise return 0. | 11 | * return 1. Otherwise return 0. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <stdio.h> | ||
15 | #include <ctype.h> | ||
16 | #include "libbb.h" | 14 | #include "libbb.h" |
17 | 15 | ||
18 | int bb_ask_confirmation(void) | 16 | int bb_ask_confirmation(void) |
diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c index 097a0a290..0f1f68687 100644 --- a/libbb/bb_askpass.c +++ b/libbb/bb_askpass.c | |||
@@ -8,13 +8,8 @@ | |||
8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <stdio.h> | ||
12 | #include <string.h> | ||
13 | #include <unistd.h> | ||
14 | #include <fcntl.h> | ||
15 | #include <signal.h> | ||
16 | #include <termios.h> | 11 | #include <termios.h> |
17 | #include <sys/ioctl.h> | 12 | //#include <sys/ioctl.h> |
18 | 13 | ||
19 | #include "libbb.h" | 14 | #include "libbb.h" |
20 | 15 | ||
diff --git a/libbb/bb_do_delay.c b/libbb/bb_do_delay.c index e14b67a19..aa26aded1 100644 --- a/libbb/bb_do_delay.c +++ b/libbb/bb_do_delay.c | |||
@@ -7,8 +7,6 @@ | |||
7 | * Licensed under the GPL v2, see the file LICENSE in this tarball. | 7 | * Licensed under the GPL v2, see the file LICENSE in this tarball. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <time.h> | ||
11 | #include <unistd.h> | ||
12 | #include "libbb.h" | 10 | #include "libbb.h" |
13 | 11 | ||
14 | void bb_do_delay(int seconds) | 12 | void bb_do_delay(int seconds) |
diff --git a/libbb/get_console.c b/libbb/get_console.c index 9797ad6f0..b12951823 100644 --- a/libbb/get_console.c +++ b/libbb/get_console.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <sys/ioctl.h> | 11 | //#include <sys/ioctl.h> |
12 | #include "libbb.h" | 12 | #include "libbb.h" |
13 | 13 | ||
14 | 14 | ||
diff --git a/libbb/herror_msg.c b/libbb/herror_msg.c index 1e6908d82..943702c68 100644 --- a/libbb/herror_msg.c +++ b/libbb/herror_msg.c | |||
@@ -7,9 +7,6 @@ | |||
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 <stdarg.h> | ||
11 | #include <stdlib.h> | ||
12 | |||
13 | #include "libbb.h" | 10 | #include "libbb.h" |
14 | 11 | ||
15 | void bb_herror_msg(const char *s, ...) | 12 | void bb_herror_msg(const char *s, ...) |
diff --git a/libbb/human_readable.c b/libbb/human_readable.c index 7469e7999..7714abecb 100644 --- a/libbb/human_readable.c +++ b/libbb/human_readable.c | |||
@@ -26,7 +26,6 @@ | |||
26 | * and "#if 0"'d below. | 26 | * and "#if 0"'d below. |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <stdio.h> | ||
30 | #include "libbb.h" | 29 | #include "libbb.h" |
31 | 30 | ||
32 | const char *make_human_readable_str(unsigned long long size, | 31 | const char *make_human_readable_str(unsigned long long size, |
diff --git a/libbb/inode_hash.c b/libbb/inode_hash.c index 78c1b0f9e..69e39af63 100644 --- a/libbb/inode_hash.c +++ b/libbb/inode_hash.c | |||
@@ -8,9 +8,6 @@ | |||
8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 8 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <stdio.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <string.h> | ||
14 | #include "libbb.h" | 11 | #include "libbb.h" |
15 | 12 | ||
16 | typedef struct ino_dev_hash_bucket_struct { | 13 | typedef struct ino_dev_hash_bucket_struct { |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 9bbc7097d..b950d7f26 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -28,7 +28,7 @@ | |||
28 | - not true viewing if length prompt less terminal width | 28 | - not true viewing if length prompt less terminal width |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <sys/ioctl.h> | 31 | //#include <sys/ioctl.h> |
32 | #include "libbb.h" | 32 | #include "libbb.h" |
33 | 33 | ||
34 | 34 | ||
diff --git a/libbb/llist.c b/libbb/llist.c index 706751447..4b3971bbe 100644 --- a/libbb/llist.c +++ b/libbb/llist.c | |||
@@ -10,7 +10,6 @@ | |||
10 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. | 10 | * Licensed under the GPL v2 or later, see the file LICENSE in this tarball. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <stdlib.h> | ||
14 | #include "libbb.h" | 13 | #include "libbb.h" |
15 | 14 | ||
16 | /* Add data to the start of the linked list. */ | 15 | /* Add data to the start of the linked list. */ |
diff --git a/libbb/login.c b/libbb/login.c index f3a3357bc..1cbadd228 100644 --- a/libbb/login.c +++ b/libbb/login.c | |||
@@ -10,12 +10,8 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <sys/param.h> /* MAXHOSTNAMELEN */ | 12 | #include <sys/param.h> /* MAXHOSTNAMELEN */ |
13 | #include <stdio.h> | ||
14 | #include <unistd.h> | ||
15 | #include "libbb.h" | ||
16 | |||
17 | #include <sys/utsname.h> | 13 | #include <sys/utsname.h> |
18 | #include <time.h> | 14 | #include "libbb.h" |
19 | 15 | ||
20 | #define LOGIN " login: " | 16 | #define LOGIN " login: " |
21 | 17 | ||
diff --git a/libbb/mtab_file.c b/libbb/mtab_file.c index 67367e3d7..d00405d8a 100644 --- a/libbb/mtab_file.c +++ b/libbb/mtab_file.c | |||
@@ -7,10 +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 <stdio.h> | ||
11 | #include "libbb.h" | 10 | #include "libbb.h" |
12 | 11 | ||
13 | |||
14 | /* Busybox mount uses either /proc/mounts or /etc/mtab to | 12 | /* Busybox mount uses either /proc/mounts or /etc/mtab to |
15 | * get the list of currently mounted filesystems */ | 13 | * get the list of currently mounted filesystems */ |
16 | const char bb_path_mtab_file[] = | 14 | const char bb_path_mtab_file[] = |
diff --git a/libbb/safe_strncpy.c b/libbb/safe_strncpy.c index 42bc16ea0..ebc7e28f3 100644 --- a/libbb/safe_strncpy.c +++ b/libbb/safe_strncpy.c | |||
@@ -7,11 +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 <string.h> | ||
11 | #include "libbb.h" | 10 | #include "libbb.h" |
12 | 11 | ||
13 | |||
14 | |||
15 | /* Like strncpy but make sure the resulting string is always 0 terminated. */ | 12 | /* Like strncpy but make sure the resulting string is always 0 terminated. */ |
16 | char * safe_strncpy(char *dst, const char *src, size_t size) | 13 | char * safe_strncpy(char *dst, const char *src, size_t size) |
17 | { | 14 | { |
diff --git a/libbb/sha1.c b/libbb/sha1.c index 734fde4c5..552dcad80 100644 --- a/libbb/sha1.c +++ b/libbb/sha1.c | |||
@@ -16,14 +16,6 @@ | |||
16 | * stored in memory. It runs at 22 cycles per byte on a Pentium P4 processor | 16 | * stored in memory. It runs at 22 cycles per byte on a Pentium P4 processor |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <fcntl.h> | ||
20 | #include <limits.h> | ||
21 | #include <stdio.h> | ||
22 | #include <stdint.h> | ||
23 | #include <stdlib.h> | ||
24 | #include <string.h> | ||
25 | #include <unistd.h> | ||
26 | |||
27 | #include "libbb.h" | 19 | #include "libbb.h" |
28 | 20 | ||
29 | #define SHA1_BLOCK_SIZE 64 | 21 | #define SHA1_BLOCK_SIZE 64 |
diff --git a/miscutils/chrt.c b/miscutils/chrt.c index 8a4b78fc4..d549708b4 100644 --- a/miscutils/chrt.c +++ b/miscutils/chrt.c | |||
@@ -6,7 +6,6 @@ | |||
6 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 6 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <unistd.h> | ||
10 | #include <sched.h> | 9 | #include <sched.h> |
11 | #include <getopt.h> /* optind */ | 10 | #include <getopt.h> /* optind */ |
12 | #include "libbb.h" | 11 | #include "libbb.h" |
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 994b80e76..ad934a3a4 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -54,15 +54,15 @@ | |||
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 | 56 | ||
57 | #include "libbb.h" | 57 | //#include <sys/wait.h> |
58 | #include "xregex.h" | 58 | //#include <sys/ioctl.h> |
59 | #include <sys/wait.h> | 59 | //#include <sys/socket.h> |
60 | #include <sys/ioctl.h> | ||
61 | #include <sys/socket.h> | ||
62 | #include <sys/un.h> | 60 | #include <sys/un.h> |
63 | #include <dirent.h> | 61 | #include <dirent.h> |
64 | #include <syslog.h> | 62 | #include <syslog.h> |
65 | #include <sys/sysmacros.h> | 63 | #include <sys/sysmacros.h> |
64 | #include "libbb.h" | ||
65 | #include "xregex.h" | ||
66 | 66 | ||
67 | 67 | ||
68 | /* Various defines taken from linux/major.h */ | 68 | /* Various defines taken from linux/major.h */ |
diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c index f7d55de0f..0aabfb024 100644 --- a/miscutils/runlevel.c +++ b/miscutils/runlevel.c | |||
@@ -12,11 +12,8 @@ | |||
12 | * initially busyboxified by Bernhard Fischer | 12 | * initially busyboxified by Bernhard Fischer |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "libbb.h" | ||
16 | #include <stdio.h> | ||
17 | #include <utmp.h> | 15 | #include <utmp.h> |
18 | #include <time.h> | 16 | #include "libbb.h" |
19 | #include <stdlib.h> | ||
20 | 17 | ||
21 | int runlevel_main(int argc, char **argv); | 18 | int runlevel_main(int argc, char **argv); |
22 | int runlevel_main(int argc, char **argv) | 19 | int runlevel_main(int argc, char **argv) |
@@ -32,12 +29,15 @@ int runlevel_main(int argc, char **argv) | |||
32 | prev = ut->ut_pid / 256; | 29 | prev = ut->ut_pid / 256; |
33 | if (prev == 0) prev = 'N'; | 30 | if (prev == 0) prev = 'N'; |
34 | printf("%c %c\n", prev, ut->ut_pid % 256); | 31 | printf("%c %c\n", prev, ut->ut_pid % 256); |
35 | endutent(); | 32 | if (ENABLE_FEATURE_CLEAN_UP) |
33 | endutent(); | ||
36 | return 0; | 34 | return 0; |
37 | } | 35 | } |
38 | } | 36 | } |
39 | 37 | ||
40 | puts("unknown"); | 38 | puts("unknown"); |
41 | endutent(); | 39 | |
40 | if (ENABLE_FEATURE_CLEAN_UP) | ||
41 | endutent(); | ||
42 | return 1; | 42 | return 1; |
43 | } | 43 | } |
diff --git a/modutils/insmod.c b/modutils/insmod.c index f8be9ce6b..c84e2b96c 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c | |||
@@ -496,7 +496,6 @@ int delete_module(const char *); | |||
496 | 496 | ||
497 | /* The relocatable object is manipulated using elfin types. */ | 497 | /* The relocatable object is manipulated using elfin types. */ |
498 | 498 | ||
499 | #include <stdio.h> | ||
500 | #include <elf.h> | 499 | #include <elf.h> |
501 | #include <endian.h> | 500 | #include <endian.h> |
502 | 501 | ||
diff --git a/networking/arping.c b/networking/arping.c index 0371df369..d65be815a 100644 --- a/networking/arping.c +++ b/networking/arping.c | |||
@@ -8,8 +8,8 @@ | |||
8 | * Busybox port: Nick Fedchik <nick@fedchik.org.ua> | 8 | * Busybox port: Nick Fedchik <nick@fedchik.org.ua> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <sys/ioctl.h> | 11 | //#include <sys/ioctl.h> |
12 | #include <signal.h> | 12 | //#include <signal.h> |
13 | 13 | ||
14 | #include <arpa/inet.h> | 14 | #include <arpa/inet.h> |
15 | #include <net/if.h> | 15 | #include <net/if.h> |
diff --git a/networking/libiproute/ip_parse_common_args.c b/networking/libiproute/ip_parse_common_args.c index 6efbc6912..cea5b4753 100644 --- a/networking/libiproute/ip_parse_common_args.c +++ b/networking/libiproute/ip_parse_common_args.c | |||
@@ -15,12 +15,8 @@ | |||
15 | * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses | 15 | * Rani Assaf <rani@magic.metawire.com> 980929: resolve addresses |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <string.h> | 18 | #include "ip_common.h" /* #include "libbb.h" is inside */ |
19 | |||
20 | #include "libbb.h" | ||
21 | #include "utils.h" | 19 | #include "utils.h" |
22 | #include "ip_common.h" | ||
23 | |||
24 | 20 | ||
25 | int preferred_family = AF_UNSPEC; | 21 | int preferred_family = AF_UNSPEC; |
26 | smallint oneline; | 22 | smallint oneline; |
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 4f83924ae..e504862a9 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c | |||
@@ -10,20 +10,15 @@ | |||
10 | * Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated | 10 | * Laszlo Valko <valko@linux.karinthy.hu> 990223: address label must be zero terminated |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include "libbb.h" | 13 | //#include <sys/socket.h> |
14 | #include <sys/socket.h> | 14 | //#include <sys/ioctl.h> |
15 | #include <sys/ioctl.h> | ||
16 | |||
17 | #include <fnmatch.h> | 15 | #include <fnmatch.h> |
18 | #include <string.h> | ||
19 | #include <unistd.h> | ||
20 | |||
21 | #include <net/if.h> | 16 | #include <net/if.h> |
22 | #include <net/if_arp.h> | 17 | #include <net/if_arp.h> |
23 | 18 | ||
19 | #include "ip_common.h" /* #include "libbb.h" is inside */ | ||
24 | #include "rt_names.h" | 20 | #include "rt_names.h" |
25 | #include "utils.h" | 21 | #include "utils.h" |
26 | #include "ip_common.h" | ||
27 | 22 | ||
28 | 23 | ||
29 | typedef struct filter_t { | 24 | typedef struct filter_t { |
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c index 5feab1e49..7db4d7e15 100644 --- a/networking/libiproute/iplink.c +++ b/networking/libiproute/iplink.c | |||
@@ -7,20 +7,16 @@ | |||
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 "libbb.h" | 10 | //#include <sys/ioctl.h> |
11 | 11 | //#include <sys/socket.h> | |
12 | #include <sys/ioctl.h> | ||
13 | #include <sys/socket.h> | ||
14 | |||
15 | #include <net/if.h> | 12 | #include <net/if.h> |
16 | #include <net/if_packet.h> | 13 | #include <net/if_packet.h> |
17 | #include <netpacket/packet.h> | 14 | #include <netpacket/packet.h> |
18 | |||
19 | #include <net/ethernet.h> | 15 | #include <net/ethernet.h> |
20 | 16 | ||
17 | #include "ip_common.h" /* #include "libbb.h" is inside */ | ||
21 | #include "rt_names.h" | 18 | #include "rt_names.h" |
22 | #include "utils.h" | 19 | #include "utils.h" |
23 | #include "ip_common.h" | ||
24 | 20 | ||
25 | /* taken from linux/sockios.h */ | 21 | /* taken from linux/sockios.h */ |
26 | #define SIOCSIFNAME 0x8923 /* set interface name */ | 22 | #define SIOCSIFNAME 0x8923 /* set interface name */ |
diff --git a/networking/libiproute/iproute.c b/networking/libiproute/iproute.c index 4efe9fd74..75e52939c 100644 --- a/networking/libiproute/iproute.c +++ b/networking/libiproute/iproute.c | |||
@@ -13,11 +13,9 @@ | |||
13 | * Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized | 13 | * Kunihiro Ishiguro <kunihiro@zebra.org> 001102: rtnh_ifindex was not initialized |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "libbb.h" | 16 | #include "ip_common.h" /* #include "libbb.h" is inside */ |
17 | |||
18 | #include "rt_names.h" | 17 | #include "rt_names.h" |
19 | #include "utils.h" | 18 | #include "utils.h" |
20 | #include "ip_common.h" | ||
21 | 19 | ||
22 | #ifndef RTAX_RTTVAR | 20 | #ifndef RTAX_RTTVAR |
23 | #define RTAX_RTTVAR RTAX_HOPS | 21 | #define RTAX_RTTVAR RTAX_HOPS |
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c index 0499a0994..e2e96f023 100644 --- a/networking/libiproute/iprule.c +++ b/networking/libiproute/iprule.c | |||
@@ -16,16 +16,16 @@ | |||
16 | * initially integrated into busybox by Bernhard Fischer | 16 | * initially integrated into busybox by Bernhard Fischer |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include "libbb.h" | ||
20 | #include <syslog.h> | 19 | #include <syslog.h> |
21 | #include <sys/socket.h> | 20 | //#include <sys/socket.h> |
22 | #include <netinet/in.h> | 21 | #include <netinet/in.h> |
23 | #include <netinet/ip.h> | 22 | #include <netinet/ip.h> |
24 | #include <arpa/inet.h> | 23 | #include <arpa/inet.h> |
25 | 24 | ||
25 | #include "ip_common.h" /* #include "libbb.h" is inside */ | ||
26 | #include "rt_names.h" | 26 | #include "rt_names.h" |
27 | #include "utils.h" | 27 | #include "utils.h" |
28 | #include "ip_common.h" | 28 | |
29 | /* | 29 | /* |
30 | static void usage(void) __attribute__((noreturn)); | 30 | static void usage(void) __attribute__((noreturn)); |
31 | 31 | ||
@@ -41,6 +41,7 @@ static void usage(void) | |||
41 | exit(-1); | 41 | exit(-1); |
42 | } | 42 | } |
43 | */ | 43 | */ |
44 | |||
44 | static int print_rule(struct sockaddr_nl *who ATTRIBUTE_UNUSED, | 45 | static int print_rule(struct sockaddr_nl *who ATTRIBUTE_UNUSED, |
45 | struct nlmsghdr *n, void *arg) | 46 | struct nlmsghdr *n, void *arg) |
46 | { | 47 | { |
diff --git a/networking/libiproute/iptunnel.c b/networking/libiproute/iptunnel.c index a2eb0ccda..3327b27a3 100644 --- a/networking/libiproute/iptunnel.c +++ b/networking/libiproute/iptunnel.c | |||
@@ -14,24 +14,20 @@ | |||
14 | * Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag | 14 | * Phil Karn <karn@ka9q.ampr.org> 990408: "pmtudisc" flag |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include "libbb.h" | 17 | //#include <sys/socket.h> |
18 | #include <sys/socket.h> | 18 | //#include <sys/ioctl.h> |
19 | #include <sys/ioctl.h> | ||
20 | |||
21 | #include <netinet/ip.h> | 19 | #include <netinet/ip.h> |
22 | |||
23 | #include <net/if.h> | 20 | #include <net/if.h> |
24 | #include <net/if_arp.h> | 21 | #include <net/if_arp.h> |
25 | |||
26 | #include <asm/types.h> | 22 | #include <asm/types.h> |
27 | #ifndef __constant_htons | 23 | #ifndef __constant_htons |
28 | #define __constant_htons htons | 24 | #define __constant_htons htons |
29 | #endif | 25 | #endif |
30 | #include <linux/if_tunnel.h> | 26 | #include <linux/if_tunnel.h> |
31 | 27 | ||
28 | #include "ip_common.h" /* #include "libbb.h" is inside */ | ||
32 | #include "rt_names.h" | 29 | #include "rt_names.h" |
33 | #include "utils.h" | 30 | #include "utils.h" |
34 | #include "ip_common.h" | ||
35 | 31 | ||
36 | 32 | ||
37 | /* Dies on error */ | 33 | /* Dies on error */ |
diff --git a/networking/libiproute/ll_addr.c b/networking/libiproute/ll_addr.c index b4a218780..ab5a2c522 100644 --- a/networking/libiproute/ll_addr.c +++ b/networking/libiproute/ll_addr.c | |||
@@ -10,11 +10,9 @@ | |||
10 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> | 10 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include "libbb.h" | ||
14 | |||
15 | #include <string.h> | ||
16 | #include <net/if_arp.h> | 13 | #include <net/if_arp.h> |
17 | 14 | ||
15 | #include "libbb.h" | ||
18 | #include "rt_names.h" | 16 | #include "rt_names.h" |
19 | #include "utils.h" | 17 | #include "utils.h" |
20 | 18 | ||
diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index e9a1616cc..eb9b0a4ff 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c | |||
@@ -11,16 +11,14 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "libbb.h" | 14 | //#include <sys/socket.h> /* socket() */ |
15 | #include <string.h> | 15 | #include <net/if.h> /* struct ifreq and co. */ |
16 | //#include <sys/ioctl.h> /* ioctl() & SIOCGIFINDEX */ | ||
16 | 17 | ||
18 | #include "libbb.h" | ||
17 | #include "libnetlink.h" | 19 | #include "libnetlink.h" |
18 | #include "ll_map.h" | 20 | #include "ll_map.h" |
19 | 21 | ||
20 | #include <sys/socket.h> /* socket() */ | ||
21 | #include <net/if.h> /* struct ifreq and co. */ | ||
22 | #include <sys/ioctl.h> /* ioctl() & SIOCGIFINDEX */ | ||
23 | |||
24 | struct idxmap { | 22 | struct idxmap { |
25 | struct idxmap * next; | 23 | struct idxmap * next; |
26 | int index; | 24 | int index; |
diff --git a/networking/libiproute/ll_proto.c b/networking/libiproute/ll_proto.c index aad460b5f..10d749881 100644 --- a/networking/libiproute/ll_proto.c +++ b/networking/libiproute/ll_proto.c | |||
@@ -11,7 +11,6 @@ | |||
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include "libbb.h" | 13 | #include "libbb.h" |
14 | |||
15 | #include "rt_names.h" | 14 | #include "rt_names.h" |
16 | #include "utils.h" | 15 | #include "utils.h" |
17 | 16 | ||
diff --git a/networking/libiproute/ll_types.c b/networking/libiproute/ll_types.c index 416ea6bbe..5d2843b14 100644 --- a/networking/libiproute/ll_types.c +++ b/networking/libiproute/ll_types.c | |||
@@ -9,10 +9,10 @@ | |||
9 | * | 9 | * |
10 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> | 10 | * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> |
11 | */ | 11 | */ |
12 | #include <stdio.h> | ||
13 | #include <arpa/inet.h> | 12 | #include <arpa/inet.h> |
14 | #include <linux/if_arp.h> | 13 | #include <linux/if_arp.h> |
15 | 14 | ||
15 | #include "libbb.h" | ||
16 | #include "rt_names.h" | 16 | #include "rt_names.h" |
17 | 17 | ||
18 | const char* ll_type_n2a(int type, char *buf, int len) | 18 | const char* ll_type_n2a(int type, char *buf, int len) |
diff --git a/networking/libiproute/rtm_map.c b/networking/libiproute/rtm_map.c index c16406b8b..7fad0ecc8 100644 --- a/networking/libiproute/rtm_map.c +++ b/networking/libiproute/rtm_map.c | |||
@@ -11,8 +11,7 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <stdlib.h> | 14 | #include "libbb.h" |
15 | #include <string.h> | ||
16 | #include "rt_names.h" | 15 | #include "rt_names.h" |
17 | #include "utils.h" | 16 | #include "utils.h" |
18 | 17 | ||
diff --git a/networking/libiproute/utils.c b/networking/libiproute/utils.c index 9605c39db..7fc1dbc26 100644 --- a/networking/libiproute/utils.c +++ b/networking/libiproute/utils.c | |||
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "libbb.h" | 14 | #include "libbb.h" |
15 | |||
16 | #include "utils.h" | 15 | #include "utils.h" |
17 | #include "inet_common.h" | 16 | #include "inet_common.h" |
18 | 17 | ||
diff --git a/networking/libiproute/utils.h b/networking/libiproute/utils.h index 3b6fef1e3..3bbc71d14 100644 --- a/networking/libiproute/utils.h +++ b/networking/libiproute/utils.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #ifndef __UTILS_H__ | 2 | #ifndef __UTILS_H__ |
3 | #define __UTILS_H__ 1 | 3 | #define __UTILS_H__ 1 |
4 | 4 | ||
5 | #include "libbb.h" | ||
6 | |||
7 | #include "libnetlink.h" | 5 | #include "libnetlink.h" |
8 | #include "ll_map.h" | 6 | #include "ll_map.h" |
9 | #include "rtm_map.h" | 7 | #include "rtm_map.h" |
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index ed908ede9..0c1c6fabb 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c | |||
@@ -9,9 +9,8 @@ | |||
9 | * Licensed under GPLv2, see file LICENSE in this tarball for details. | 9 | * Licensed under GPLv2, see file LICENSE in this tarball for details. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "libbb.h" | ||
13 | #include <unistd.h> | ||
14 | #include <sys/klog.h> | 12 | #include <sys/klog.h> |
13 | #include "libbb.h" | ||
15 | 14 | ||
16 | int dmesg_main(int argc, char **argv); | 15 | int dmesg_main(int argc, char **argv); |
17 | int dmesg_main(int argc, char **argv) | 16 | int dmesg_main(int argc, char **argv) |
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c index 686492578..c4b793ef8 100644 --- a/util-linux/hwclock.c +++ b/util-linux/hwclock.c | |||
@@ -7,8 +7,7 @@ | |||
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 | 10 | //#include <sys/ioctl.h> | |
11 | #include <sys/ioctl.h> | ||
12 | #include <sys/utsname.h> | 11 | #include <sys/utsname.h> |
13 | #include <getopt.h> | 12 | #include <getopt.h> |
14 | #include "libbb.h" | 13 | #include "libbb.h" |