summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-20 09:12:42 -0400
committerLennart Poettering <lennart@poettering.net>2016-05-20 15:12:42 +0200
commit6f270e6bd8b78aedf9f77534d6d11141ea0bf8ca (patch)
tree84f04bb9b8655f5fca5aab0881d6cdb9ba39be38 /src/shared
parent0e3e1aefebffdd97befd06586d055c5996697eed (diff)
Make the fix for net/if.h fuckup even worse (#3287)
The original conflict is fixed in the kernel in v4.6-rc7-40-g4a91cb61bb, but now our work-around causes a compilation failure. Keep the workaround to support 4.5 kernels for now, and layer more ugliness on top. Tested with: kernel-headers-4.6.0-1.fc25.x86_64 glibc-devel-2.23.90-18.fc25.x86_64 kernel-headers-4.5.4-300.fc24.x86_64 glibc-devel-2.23.1-7.fc24.x86_64 kernel-headers-4.4.9-300.fc23.x86_64 glibc-devel-2.22-16.fc23.x86_64 kernel-headers-4.1.13-100.fc21.x86_64 glibc-devel-2.20-8.fc21.x86_64
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/firewall-util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shared/firewall-util.c b/src/shared/firewall-util.c
index 97865eac4a..f73108eaa3 100644
--- a/src/shared/firewall-util.c
+++ b/src/shared/firewall-util.c
@@ -29,12 +29,10 @@
#include <string.h>
#include <sys/socket.h>
#include <net/if.h>
-#include <linux/if.h>
#ifndef IFNAMSIZ
-#undef _NET_IF_H
-/* Let's make sure to include this one, too, if IFNAMSIZ isn't defined yet, as it is for kernels <= 4.2 */
-#include <net/if.h>
+#define IFNAMSIZ 16
#endif
+#include <linux/if.h>
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter/nf_nat.h>
#include <linux/netfilter/xt_addrtype.h>