[PATCH] Fix linux/netfilter/xt_osf.h dependencies

JingPiao Chen chenjingpiao at gmail.com
Fri Oct 13 01:16:31 UTC 2017


Header older then linux kernel commit v4.4-rc1-167-g1ffad83
("netfilter: fix include files for compilation") should include
<linux/ip.h> and <linux/tcp.h> before <linux/netfilter/xt_osf.h>.

* configure.ac (AC_CHECK_HEADERS): Check linux/netfilter/xt_osf.h
using the fourth argument.
* tests/nfnetlink_osf.c: Include <linux/ip.h> and <linux/tcp.h>.
---
 configure.ac          | 4 +++-
 tests/nfnetlink_osf.c | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 72aaf6a..29285db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -408,7 +408,6 @@ AC_CHECK_HEADERS(m4_normalize([
 	linux/netfilter/nfnetlink_cttimeout.h
 	linux/netfilter/nfnetlink_log.h
 	linux/netfilter/nfnetlink_queue.h
-	linux/netfilter/xt_osf.h
 	linux/nsfs.h
 	linux/perf_event.h
 	linux/quota.h
@@ -443,6 +442,9 @@ AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
 
 AC_CHECK_HEADERS([linux/mqueue.h],,, [#include <linux/types.h>])
 
+AC_CHECK_HEADERS([linux/netfilter/xt_osf.h],,, [#include <linux/ip.h>
+#include <linux/tcp.h>])
+
 AC_CHECK_HEADERS(m4_normalize([
 	linux/netfilter_arp/arp_tables.h
 	linux/netfilter_bridge/ebtables.h
diff --git a/tests/nfnetlink_osf.c b/tests/nfnetlink_osf.c
index 59cf5fb..a6dbb7e 100644
--- a/tests/nfnetlink_osf.c
+++ b/tests/nfnetlink_osf.c
@@ -33,6 +33,8 @@
 # include <stdio.h>
 # include <sys/socket.h>
 # include "netlink.h"
+# include <linux/ip.h>
+# include <linux/tcp.h>
 # include <linux/netfilter/nfnetlink.h>
 # include <linux/netfilter/xt_osf.h>
 
-- 
2.7.4





More information about the Strace-devel mailing list