[RFC] use <linux/if.h> instead of <net/if.h>



Use of <net/if.h> conflicts with the use of <linux/if.h>. While users
of <net/if.h> can switch to <linux/if.h> it is not posible in the
other direction.

The header <netlink/route/link.h> uses <linux/if.h> because it is part
of the API, therefore it conflicts with NM.

Does NM rely on using <net/if.h> for some reason or can we switch over
to using <linux/if.h>?

---
 include/wireless-helper.h              |    2 +-
 src/nm-device.c                        |    2 +-
 src/nm-system.c                        |    2 +-
 src/ppp-manager/nm-ppp-manager.c       |    2 +-
 src/settings/plugins/ifcfg-rh/reader.c |    2 +-
 src/wimax/iwmxsdk.c                    |    2 +-
 src/wimax/nm-device-wimax.c            |    2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/wireless-helper.h b/include/wireless-helper.h
index d150ef7..2e4509a 100644
--- a/include/wireless-helper.h
+++ b/include/wireless-helper.h
@@ -27,6 +27,6 @@
 #include <sys/types.h>
 #include <linux/types.h>
 #include <sys/socket.h>
-#include <net/if.h>
+#include <linux/if.h>
 #include <wireless.h>
 
diff --git a/src/nm-device.c b/src/nm-device.c
index 3522ea4..a453c39 100644
--- a/src/nm-device.c
+++ b/src/nm-device.c
@@ -25,7 +25,7 @@
 #include <dbus/dbus.h>
 #include <netinet/in.h>
 #include <string.h>
-#include <net/if.h>
+#include <linux/if.h>
 #include <unistd.h>
 #include <errno.h>
 #include <sys/ioctl.h>
diff --git a/src/nm-system.c b/src/nm-system.c
index 0b29468..473fcec 100644
--- a/src/nm-system.c
+++ b/src/nm-system.c
@@ -40,7 +40,7 @@
 #include <netdb.h>
 #include <glib.h>
 #include <ctype.h>
-#include <net/if.h>
+#include <linux/if.h>
 
 #include "nm-system.h"
 #include "nm-device.h"
diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c
index e863aab..9d8b79e 100644
--- a/src/ppp-manager/nm-ppp-manager.c
+++ b/src/ppp-manager/nm-ppp-manager.c
@@ -32,7 +32,7 @@
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <asm/types.h>
-#include <net/if.h>
+#include <linux/if.h>
 #include <sys/stat.h>
 
 #include <linux/ppp_defs.h>
diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c
index cdf5889..a33332a 100644
--- a/src/settings/plugins/ifcfg-rh/reader.c
+++ b/src/settings/plugins/ifcfg-rh/reader.c
@@ -28,7 +28,7 @@
 #include <ctype.h>
 #include <sys/inotify.h>
 #include <errno.h>
-#include <net/if.h>
+#include <linux/if.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
 #include <netinet/ether.h>
diff --git a/src/wimax/iwmxsdk.c b/src/wimax/iwmxsdk.c
index dd78d5a..f9dc714 100644
--- a/src/wimax/iwmxsdk.c
+++ b/src/wimax/iwmxsdk.c
@@ -27,7 +27,7 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
-#include <net/if.h>
+#include <linux/if.h>
 
 #include <glib.h>
 
diff --git a/src/wimax/nm-device-wimax.c b/src/wimax/nm-device-wimax.c
index d41491a..ec23520 100644
--- a/src/wimax/nm-device-wimax.c
+++ b/src/wimax/nm-device-wimax.c
@@ -23,7 +23,7 @@
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <net/ethernet.h>
-#include <net/if.h>
+#include <linux/if.h>
 
 #include <WiMaxAPI.h>
 #include <WiMaxAPIEx.h>
-- 
1.7.6



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