Re: problem with if.h >2.611



On Tue, 2006-01-10 at 17:18 +0100, giskard wrote:

> i know that this problem was alredy reported [1], but i wanted to know
> if there are patches that fix this problem so finally i/and all Debian
> users will be able to use NM :)

Here is a total hack fix.

A better fix is for wireless-tools, to have iwlib.h use <linux/if.h> and
not <net/if.h>.

	Robert Love

Index: src/nm-device-802-3-ethernet.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/nm-device-802-3-ethernet.c,v
retrieving revision 1.3
diff -u -r1.3 nm-device-802-3-ethernet.c
--- src/nm-device-802-3-ethernet.c	3 Jan 2006 17:47:38 -0000	1.3
+++ src/nm-device-802-3-ethernet.c	4 Jan 2006 17:13:33 -0000
@@ -328,7 +328,9 @@
 /**************************************/
 /*    MII capability detection        */
 /**************************************/
+#define _LINUX_IF_H
 #include <linux/mii.h>
+#undef _LINUX_IF_H
 
 static int
 mdio_read (NMDevice8023Ethernet *self, NMSock *sk, struct ifreq *ifr, int location)
Index: src/nm-netlink-monitor.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/nm-netlink-monitor.c,v
retrieving revision 1.17
diff -u -r1.17 nm-netlink-monitor.c
--- src/nm-netlink-monitor.c	12 Aug 2005 19:06:09 -0000	1.17
+++ src/nm-netlink-monitor.c	4 Jan 2006 17:13:33 -0000
@@ -30,7 +30,7 @@
 #include <linux/types.h>
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
-#include <linux/if.h>
+#include <net/if.h>
 #include <linux/unistd.h>
 #include <unistd.h>
 


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