aboutsummaryrefslogtreecommitdiff
path: root/networking/hostname.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/hostname.c')
-rw-r--r--networking/hostname.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/networking/hostname.c b/networking/hostname.c
index ec4a0e8d8..03fd88edb 100644
--- a/networking/hostname.c
+++ b/networking/hostname.c
@@ -13,15 +13,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
*/
-#include <errno.h>
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
#include "busybox.h"
+#include <getopt.h>
extern char *optarg; /* in unistd.h */
extern int optind, opterr, optopt; /* in unistd.h */
@@ -41,7 +34,7 @@ static void do_sethostname(char *s, int isfile)
bb_perror_msg_and_die("sethostname");
}
} else {
- f = bb_xfopen(s, "r");
+ f = xfopen(s, "r");
while (fgets(buf, 255, f) != NULL) {
if (buf[0] =='#') {
continue;