This is the mail archive of the
mailing list for the glibc project.
Re: Redefinition of struct in6_addr in <netinet/in.h> and<linux/in6.h>
- From: David Miller <davem at davemloft dot net>
- To: carlos at systemhalted dot org
- Cc: vapier at gentoo dot org, libc-alpha at sourceware dot org,bhutchings at solarflare dot com, yoshfuji at linux-ipv6 dot org, amwang at redhat dot com,tmb at mageia dot org, eblake at redhat dot com, netdev at vger dot kernel dot org,linux-kernel at vger dot kernel dot org, libvirt-list at redhat dot com, tgraf at suug dot ch,schwab at suse dot de
- Date: Wed, 16 Jan 2013 22:15:38 -0500 (EST)
- Subject: Re: Redefinition of struct in6_addr in <netinet/in.h> and<linux/in6.h>
- References: <firstname.lastname@example.org><email@example.com><50F75EA7.firstname.lastname@example.org>
From: Carlos O'Donell <email@example.com>
Date: Wed, 16 Jan 2013 21:15:03 -0500
> +/* If a glibc-based userspace has already included in.h, then we will not
> + * define in6_addr (nor the defines), sockaddr_in6, or ipv6_mreq. The
> + * ABI used by the kernel and by glibc match exactly. Neither the kernel
> + * nor glibc should break this ABI without coordination.
> + */
> +#ifndef _NETINET_IN_H
I think we should shoot for a non-glibc-centric solution.
I can't imagine that other libc's won't have the same exact problem
with their netinet/in.h conflicting with the kernel's, redefining
structures like in6_addr, that we'd want to provide a protection
scheme for here as well.
Let's pick some more generic names and themes for the CPP macros and
comments we use to protect the header file blocks and describe that