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



On Mon, 2011-09-12 at 16:38 -0500, Dan Williams wrote:
> On Fri, 2011-09-09 at 11:50 +0200, Thomas Graf wrote:
> > 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>?
> 
> It's being used for some ioctls, it appears.  This patch fails like so:
> 
> libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src -I../../src/logging -I../../include -I../../libnm-util -I../../marshallers -pthread -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/wimax -Wall -std=gnu89 -g -O2 -Wshadow -Wmissing-declarations -Wmissing-prototypes -Wdeclaration-after-statement -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare -fno-strict-aliasing -Wno-unused-but-set-variable -Wundef -Werror -MT libwimax_la-nm-device-wimax.lo -MD -MP -MF .deps/libwimax_la-nm-device-wimax.Tpo -c nm-device-wimax.c  -fPIC -DPIC -o .libs/libwimax_la-nm-device-wimax.o
> In file included from nm-device-wimax.c:26:0:
> /usr/include/linux/if.h:178:19: error: field 'ifru_addr' has incomplete type
> /usr/include/linux/if.h:179:19: error: field 'ifru_dstaddr' has incomplete type
> /usr/include/linux/if.h:180:19: error: field 'ifru_broadaddr' has incomplete type
> /usr/include/linux/if.h:181:19: error: field 'ifru_netmask' has incomplete type
> /usr/include/linux/if.h:182:20: error: field 'ifru_hwaddr' has incomplete type

I don't see this breakage, presumably due to differing kernel-headers.



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