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

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

 



Ok,

Thanks for your solution, it works nicely.

On Nov 26, 2007 6:01 PM, Stephen Hemminger
<shemminger@xxxxxxxxxxxxxxxxxxxx> wrote:
> I fixed the problem differently because I don't want more conditional
> compilation.  The ideal fix would be to get glibc
> to the headers fixed to be compatible.
>
>  Use linux/if.h rather than net/if.h for compatiablity with
>  other headers.
>
> Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
> ---
>  libbridge/libbridge.h |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
> index 20d5bb5..016acea 100644
> --- a/libbridge/libbridge.h
> +++ b/libbridge/libbridge.h
> @@ -19,9 +19,15 @@
>  #ifndef _LIBBRIDGE_H
>  #define _LIBBRIDGE_H
>
> -#include <net/if.h>
> +#include <sys/socket.h>
> +#include <linux/if.h>
>  #include <linux/if_bridge.h>
>
> +/* defined in net/if.h but that conflicts with linux/if.h... */
> +extern unsigned int if_nametoindex (const char *__ifname);
> +extern char *if_indextoname (unsigned int __ifindex, char *__ifname);
> +
> +
>  struct bridge_id
>  {
>         unsigned char prio[2];
> --
> 1.5.3.4
>
>
_______________________________________________
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