summaryrefslogtreecommitdiffstats
path: root/patches/ifplugd-0.28/ifplugd-fix-include.diff
blob: 4e305ee77c3557b79e6097edd9ec6df35cb50eb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Ladislav Michl <ladis@linux-mips.org>
Subject: Compilation fails because of kernel header inclusion

Fixes the following error:

In file included from interface.c:27:
/opt/crosstool/gcc-4.1.1-glibc-2.4/arm-unknown-linux-gnu/lib/gcc/arm-unknown-linux-gnu/4.1.1/../../../../arm-unknown-linux-gnu/sys-include/sys/types.h:62: error: conflicting types for 'dev_t'
... etc

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
--- ifplugd-0.28/src/interface.c	2005-01-05 01:25:31.000000000 +0100
+++ ifplugd-0.28/src/interface.c	2007-07-15 21:04:54.000000000 +0200
@@ -23,11 +23,9 @@
 #endif
 
 #include <linux/sockios.h>
-#include <linux/if_ether.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
-#include <linux/if.h>
 #include <syslog.h>
 #include <string.h>
 #include <errno.h>
@@ -43,6 +41,8 @@
 
 #include <libdaemon/dlog.h>
 
+#define ETH_ALEN	6
+
 void interface_up(int fd, char *iface) {
     struct ifreq ifr;