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 @@
13 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. 13 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
14 */ 14 */
15 15
16#include <errno.h>
17#include <arpa/inet.h>
18#include <netdb.h>
19#include <unistd.h>
20#include <string.h>
21#include <stdio.h>
22#include <stdlib.h>
23#include <getopt.h>
24#include "busybox.h" 16#include "busybox.h"
17#include <getopt.h>
25 18
26extern char *optarg; /* in unistd.h */ 19extern char *optarg; /* in unistd.h */
27extern int optind, opterr, optopt; /* in unistd.h */ 20extern int optind, opterr, optopt; /* in unistd.h */
@@ -41,7 +34,7 @@ static void do_sethostname(char *s, int isfile)
41 bb_perror_msg_and_die("sethostname"); 34 bb_perror_msg_and_die("sethostname");
42 } 35 }
43 } else { 36 } else {
44 f = bb_xfopen(s, "r"); 37 f = xfopen(s, "r");
45 while (fgets(buf, 255, f) != NULL) { 38 while (fgets(buf, 255, f) != NULL) {
46 if (buf[0] =='#') { 39 if (buf[0] =='#') {
47 continue; 40 continue;