diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2011-06-10 05:17:59 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-06-10 05:17:59 +0200 |
commit | f533ec876716415ed0e6ba28d13dfb6263068e82 (patch) | |
tree | 30b5b8ddcad3d2673d76110b8a792a5cd1b3b067 /networking/udhcp | |
parent | d488f5e8dbdcd1f5f0ebb2ee9c1f2fb4a5374290 (diff) | |
download | busybox-w32-f533ec876716415ed0e6ba28d13dfb6263068e82.tar.gz busybox-w32-f533ec876716415ed0e6ba28d13dfb6263068e82.tar.bz2 busybox-w32-f533ec876716415ed0e6ba28d13dfb6263068e82.zip |
*: simplify Ethernet header includes
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp')
-rw-r--r-- | networking/udhcp/dhcpc.c | 10 | ||||
-rw-r--r-- | networking/udhcp/packet.c | 13 | ||||
-rw-r--r-- | networking/udhcp/socket.c | 11 |
3 files changed, 6 insertions, 28 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index 5d3291b8c..4d755e6b8 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -25,14 +25,8 @@ | |||
25 | #include "dhcpd.h" | 25 | #include "dhcpd.h" |
26 | #include "dhcpc.h" | 26 | #include "dhcpc.h" |
27 | 27 | ||
28 | #include <asm/types.h> | 28 | #include <netinet/if_ether.h> |
29 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined(_NEWLIB_VERSION) | 29 | #include <netpacket/packet.h> |
30 | # include <netpacket/packet.h> | ||
31 | # include <net/ethernet.h> | ||
32 | #else | ||
33 | # include <linux/if_packet.h> | ||
34 | # include <linux/if_ether.h> | ||
35 | #endif | ||
36 | #include <linux/filter.h> | 30 | #include <linux/filter.h> |
37 | 31 | ||
38 | /* struct client_config_t client_config is in bb_common_bufsiz1 */ | 32 | /* struct client_config_t client_config is in bb_common_bufsiz1 */ |
diff --git a/networking/udhcp/packet.c b/networking/udhcp/packet.c index 2b7528cc7..66b42c5e1 100644 --- a/networking/udhcp/packet.c +++ b/networking/udhcp/packet.c | |||
@@ -6,18 +6,11 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | #include <netinet/in.h> | ||
10 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||
11 | # include <netpacket/packet.h> | ||
12 | # include <net/ethernet.h> | ||
13 | #else | ||
14 | # include <asm/types.h> | ||
15 | # include <linux/if_packet.h> | ||
16 | # include <linux/if_ether.h> | ||
17 | #endif | ||
18 | |||
19 | #include "common.h" | 9 | #include "common.h" |
20 | #include "dhcpd.h" | 10 | #include "dhcpd.h" |
11 | #include <netinet/in.h> | ||
12 | #include <netinet/if_ether.h> | ||
13 | #include <netpacket/packet.h> | ||
21 | 14 | ||
22 | void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type) | 15 | void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type) |
23 | { | 16 | { |
diff --git a/networking/udhcp/socket.c b/networking/udhcp/socket.c index 39f1cec54..a5220ba74 100644 --- a/networking/udhcp/socket.c +++ b/networking/udhcp/socket.c | |||
@@ -22,17 +22,8 @@ | |||
22 | * along with this program; if not, write to the Free Software | 22 | * along with this program; if not, write to the Free Software |
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
24 | */ | 24 | */ |
25 | #include <net/if.h> | ||
26 | #if (defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1) || defined _NEWLIB_VERSION | ||
27 | # include <netpacket/packet.h> | ||
28 | # include <net/ethernet.h> | ||
29 | #else | ||
30 | # include <asm/types.h> | ||
31 | # include <linux/if_packet.h> | ||
32 | # include <linux/if_ether.h> | ||
33 | #endif | ||
34 | |||
35 | #include "common.h" | 25 | #include "common.h" |
26 | #include <net/if.h> | ||
36 | 27 | ||
37 | int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t *nip, uint8_t *mac) | 28 | int FAST_FUNC udhcp_read_interface(const char *interface, int *ifindex, uint32_t *nip, uint8_t *mac) |
38 | { | 29 | { |