summaryrefslogtreecommitdiffstats
path: root/src/drivers/linux
diff options
context:
space:
mode:
authorMichael Brown2017-03-29 09:58:17 +0200
committerMichael Brown2017-03-29 09:58:17 +0200
commit2c056f02d09a19fb3ac91859c7bd8c558c8473cf (patch)
tree89d39bb059be1ce7c083d25e1986ccc21ec8fe34 /src/drivers/linux
parent[build] Avoid implicit-fallthrough warnings on GCC 7 (diff)
downloadipxe-2c056f02d09a19fb3ac91859c7bd8c558c8473cf.tar.gz
ipxe-2c056f02d09a19fb3ac91859c7bd8c558c8473cf.tar.xz
ipxe-2c056f02d09a19fb3ac91859c7bd8c558c8473cf.zip
[linux] Fix building with kernel 4.11 headers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/linux')
-rw-r--r--src/drivers/linux/af_packet.c1
-rw-r--r--src/drivers/linux/tap.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/drivers/linux/af_packet.c b/src/drivers/linux/af_packet.c
index 1622c8c0..65aafc5b 100644
--- a/src/drivers/linux/af_packet.c
+++ b/src/drivers/linux/af_packet.c
@@ -31,6 +31,7 @@
#include <ipxe/socket.h>
/* This hack prevents pre-2.6.32 headers from redefining struct sockaddr */
+#define _SYS_SOCKET_H
#define __GLIBC__ 2
#include <linux/socket.h>
#include <linux/if.h>
diff --git a/src/drivers/linux/tap.c b/src/drivers/linux/tap.c
index 97943665..6fe76fd4 100644
--- a/src/drivers/linux/tap.c
+++ b/src/drivers/linux/tap.c
@@ -31,6 +31,7 @@
#include <ipxe/socket.h>
/* This hack prevents pre-2.6.32 headers from redefining struct sockaddr */
+#define _SYS_SOCKET_H
#define __GLIBC__ 2
#include <linux/socket.h>
#undef __GLIBC__