Conflict between net/if.h and linux/if.h

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

 



Hi,

I use the libbridge and an other lib (libnl) in a same project.
I include the headers files of the two lib (libnl first and libbridgge
after) and I've a conflict with the inclusion of linux/if.h (in libnl
headers) and net/if.h (in libbridge.h), I've this error :

/usr/include/net/if.h:45: error: parse error before numeric constant
/usr/include/net/if.h:111: error: redefinition of `struct ifmap'
/usr/include/net/if.h:126: error: redefinition of `struct ifreq'
/usr/include/net/if.h:176: error: redefinition of `struct ifconf'

I modify the libbridge.h to include the net/if.h only if the
linux/if.h is not define :

--- libbridge.h 2007-11-22 12:16:17.000000000 +0100
+++ libbridge_modify.h  2007-11-22 12:15:58.000000000 +0100
@@ -19,7 +19,9 @@
 #ifndef _LIBBRIDGE_H
 #define _LIBBRIDGE_H

+#ifndef _LINUX_IF_H
 #include <net/if.h>
+#endif
 #include <linux/if_bridge.h>

 struct bridge_id


Do you think it's a good solution ?
Doude.
_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/bridge

[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux