summaryrefslogtreecommitdiff
path: root/dev.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-05-10 10:56:26 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-05-10 11:01:20 +0200
commitb25a51fa5915df87f31a0cc0459cd9f05e17f540 (patch)
tree1b22ab8550889f1270d938aa084ee9b792265409 /dev.c
parent977a0f81d1e7dcd746fb22b3f972578e996e86d3 (diff)
all: use <net/*> headers instead of <linux/*> where possible
The musl libc headers redefine some of the structs in linux/if_arp.h and linux/if_ether.h, leading to compilation errors. Fix those by using the libc provided versions of these headers and provide compatibility defines for those that aren't present in older glibc versions. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'dev.c')
-rw-r--r--dev.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/dev.c b/dev.c
index b509aee..82d97d2 100644
--- a/dev.c
+++ b/dev.c
@@ -3,7 +3,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
-#include <linux/if_arp.h>
+#include <net/if_arp.h>
#include <ifaddrs.h>
#include <arpa/inet.h>
@@ -385,10 +385,8 @@ const char *device_type2str(uint16_t type)
return "phonet";
case ARPHRD_PHONET_PIPE:
return "phonet_pipe";
-#if defined(ARPHRD_CAIF)
case ARPHRD_CAIF:
return "caif";
-#endif
case ARPHRD_IP6GRE:
return "ip6gre";
case ARPHRD_NETLINK: