[NetworkManager-libreswan/nm-1-0: 22/51] all: avoid including linux/in6.h



commit a7827dbf1a4a8bb96866d9e219da410b59c29a4d
Author: Lubomir Rintel <lkundrak v3 sk>
Date:   Thu Aug 27 10:56:46 2015 +0200

    all: avoid including linux/in6.h
    
    linux/xfrm.h in some versions drags it in and it pulls in definitions that
    conflict with netinet/inet.h. RHEL 7.2 kernel does this, older version don't,
    while later versions contain proper guards.
    
    (cherry picked from commit 36edb41130b47772bd95db03a685096715594d1f)

 src/nm-openswan-service-helper.c | 2 ++
 src/show-xfrm.c                  | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/nm-openswan-service-helper.c b/src/nm-openswan-service-helper.c
index 84e4f8e..249fe95 100644
--- a/src/nm-openswan-service-helper.c
+++ b/src/nm-openswan-service-helper.c
@@ -34,6 +34,8 @@
 
 #include <netlink/netlink.h>
 #include <netlink/msg.h>
+
+#define _LINUX_IN6_H 1
 #include <linux/xfrm.h>
 
 #include <dbus/dbus.h>
diff --git a/src/show-xfrm.c b/src/show-xfrm.c
index 8c6a5a6..2e20547 100644
--- a/src/show-xfrm.c
+++ b/src/show-xfrm.c
@@ -20,10 +20,12 @@
 #define _GNU_SOURCE 1
 #include <netlink/netlink.h>
 #include <netlink/msg.h>
-#include <linux/xfrm.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
 
+#define _LINUX_IN6_H 1
+#include <linux/xfrm.h>
+
 #include <glib.h>
 
 static int


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]