aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute/iplink.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-06-02 20:53:38 +0000
committerRob Landley <rob@landley.net>2006-06-02 20:53:38 +0000
commitecae66ac16338d8cddb55e1782ebd8c5f670ff53 (patch)
treeec67cd4591e5730790172f99eefd519ad7985e58 /networking/libiproute/iplink.c
parentff97ee9abda67ac0b85e0dc97a3d78ee85071cbf (diff)
downloadbusybox-w32-ecae66ac16338d8cddb55e1782ebd8c5f670ff53.tar.gz
busybox-w32-ecae66ac16338d8cddb55e1782ebd8c5f670ff53.tar.bz2
busybox-w32-ecae66ac16338d8cddb55e1782ebd8c5f670ff53.zip
Header cleanup: don't #include headers that libbb.h already includes.
Diffstat (limited to 'networking/libiproute/iplink.c')
-rw-r--r--networking/libiproute/iplink.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c
index 12677d522..2797f0250 100644
--- a/networking/libiproute/iplink.c
+++ b/networking/libiproute/iplink.c
@@ -1,21 +1,17 @@
1/* 1/*
2 * iplink.c "ip link". 2 * iplink.c "ip link".
3 * 3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 4 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
10 * 5 *
6 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
11 */ 7 */
12 8
9#include "libbb.h"
10
13#include <sys/ioctl.h> 11#include <sys/ioctl.h>
14#include <sys/socket.h> 12#include <sys/socket.h>
15#include <linux/version.h>
16 13
17#include <errno.h> 14#include <errno.h>
18#include <stdlib.h>
19#include <string.h> 15#include <string.h>
20#include <unistd.h> 16#include <unistd.h>
21 17
@@ -23,19 +19,12 @@
23#include <net/if_packet.h> 19#include <net/if_packet.h>
24#include <netpacket/packet.h> 20#include <netpacket/packet.h>
25 21
26#if __GLIBC__ >=2 && __GLIBC_MINOR >= 1
27#include <net/ethernet.h> 22#include <net/ethernet.h>
28#else
29#include <linux/if_ether.h>
30#endif
31 23
32#include "rt_names.h" 24#include "rt_names.h"
33#include "utils.h" 25#include "utils.h"
34#include "ip_common.h" 26#include "ip_common.h"
35 27
36#include "libbb.h"
37
38
39/* take from linux/sockios.h */ 28/* take from linux/sockios.h */
40#define SIOCSIFNAME 0x8923 /* set interface name */ 29#define SIOCSIFNAME 0x8923 /* set interface name */
41 30
@@ -96,7 +85,6 @@ static int do_chflags(char *dev, __u32 flags, __u32 mask)
96 85
97static int do_changename(char *dev, char *newdev) 86static int do_changename(char *dev, char *newdev)
98{ 87{
99#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
100 struct ifreq ifr; 88 struct ifreq ifr;
101 int fd; 89 int fd;
102 int err; 90 int err;
@@ -114,8 +102,6 @@ static int do_changename(char *dev, char *newdev)
114 } 102 }
115 close(fd); 103 close(fd);
116 return err; 104 return err;
117#endif
118 return 0;
119} 105}
120 106
121static int set_qlen(char *dev, int qlen) 107static int set_qlen(char *dev, int qlen)