aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/dutmp.c4
-rw-r--r--miscutils/mktemp.c2
-rw-r--r--miscutils/mt.c1
-rw-r--r--miscutils/readlink.c1
-rw-r--r--miscutils/update.c3
-rw-r--r--miscutils/watchdog.c2
6 files changed, 12 insertions, 1 deletions
diff --git a/miscutils/dutmp.c b/miscutils/dutmp.c
index efd15dfbf..7e1d2eed7 100644
--- a/miscutils/dutmp.c
+++ b/miscutils/dutmp.c
@@ -21,6 +21,8 @@
21#define bb_need_io_error 21#define bb_need_io_error
22#include "messages.c" 22#include "messages.c"
23#include <utmp.h> 23#include <utmp.h>
24#include <stdlib.h>
25#include <unistd.h>
24 26
25extern int dutmp_main(int argc, char **argv) 27extern int dutmp_main(int argc, char **argv)
26{ 28{
@@ -35,7 +37,7 @@ extern int dutmp_main(int argc, char **argv)
35 } else { 37 } else {
36 file = open(argv[1], O_RDONLY); 38 file = open(argv[1], O_RDONLY);
37 if (file < 0) { 39 if (file < 0) {
38 error_msg_and_die(io_error, argv[1], strerror(errno)); 40 perror_msg_and_die(io_error, argv[1]);
39 } 41 }
40 } 42 }
41 43
diff --git a/miscutils/mktemp.c b/miscutils/mktemp.c
index 2d53cc2a4..3b9f2b22c 100644
--- a/miscutils/mktemp.c
+++ b/miscutils/mktemp.c
@@ -25,6 +25,8 @@
25#include "busybox.h" 25#include "busybox.h"
26#include <stdio.h> 26#include <stdio.h>
27#include <errno.h> 27#include <errno.h>
28#include <unistd.h>
29#include <stdlib.h>
28 30
29extern int mktemp_main(int argc, char **argv) 31extern int mktemp_main(int argc, char **argv)
30{ 32{
diff --git a/miscutils/mt.c b/miscutils/mt.c
index 70d03cca4..0d28339b9 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -1,6 +1,7 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2#include "busybox.h" 2#include "busybox.h"
3#include <stdio.h> 3#include <stdio.h>
4#include <stdlib.h>
4#include <sys/mtio.h> 5#include <sys/mtio.h>
5#include <sys/fcntl.h> 6#include <sys/fcntl.h>
6 7
diff --git a/miscutils/readlink.c b/miscutils/readlink.c
index bb2056a25..98f1dea4f 100644
--- a/miscutils/readlink.c
+++ b/miscutils/readlink.c
@@ -25,6 +25,7 @@
25#include "busybox.h" 25#include "busybox.h"
26#include <errno.h> 26#include <errno.h>
27#include <unistd.h> 27#include <unistd.h>
28#include <stdlib.h>
28 29
29int readlink_main(int argc, char **argv) 30int readlink_main(int argc, char **argv)
30{ 31{
diff --git a/miscutils/update.c b/miscutils/update.c
index 080cb99c3..309ce0cbd 100644
--- a/miscutils/update.c
+++ b/miscutils/update.c
@@ -32,11 +32,14 @@
32#include <sys/param.h> 32#include <sys/param.h>
33#include <sys/syslog.h> 33#include <sys/syslog.h>
34#include <unistd.h> /* for getopt() */ 34#include <unistd.h> /* for getopt() */
35#include <stdlib.h>
35 36
36 37
37#if defined(__GLIBC__) 38#if defined(__GLIBC__)
38#include <sys/kdaemon.h> 39#include <sys/kdaemon.h>
39#else 40#else
41#include <sys/syscall.h>
42#include <linux/unistd.h>
40static _syscall2(int, bdflush, int, func, int, data); 43static _syscall2(int, bdflush, int, func, int, data);
41#endif /* __GLIBC__ */ 44#endif /* __GLIBC__ */
42 45
diff --git a/miscutils/watchdog.c b/miscutils/watchdog.c
index d297afa02..7026cc005 100644
--- a/miscutils/watchdog.c
+++ b/miscutils/watchdog.c
@@ -23,6 +23,8 @@
23#include "busybox.h" 23#include "busybox.h"
24#include <stdio.h> 24#include <stdio.h>
25#include <fcntl.h> 25#include <fcntl.h>
26#include <unistd.h>
27#include <stdlib.h>
26 28
27extern int watchdog_main(int argc, char **argv) 29extern int watchdog_main(int argc, char **argv)
28{ 30{