Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread YOSHIFUJI Hideaki
Carlos O'Donell wrote: On 01/18/2013 05:44 AM, Pedro Alves wrote: On 01/18/2013 04:22 AM, Carlos O'Donell wrote: On Thu, Jan 17, 2013 at 11:20 PM, Mike Frysinger vap...@gentoo.org wrote: On Wednesday 16 January 2013 22:15:38 David Miller wrote: From: Carlos O'Donell car...@systemhalted.org

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread Carlos O'Donell
On Fri, Jan 18, 2013 at 9:36 AM, Pedro Alves pal...@redhat.com wrote: On 01/18/2013 02:24 PM, YOSHIFUJI Hideaki wrote: It's simple enough to move all of the __GLIBC__ uses into libc-compat.h, then you control userspace libc coordination from one file. How about just deciding on a single

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread Pedro Alves
On 01/18/2013 02:24 PM, YOSHIFUJI Hideaki wrote: It's simple enough to move all of the __GLIBC__ uses into libc-compat.h, then you control userspace libc coordination from one file. How about just deciding on a single macro/symbol both the kernel and libc (any libc that needs this) define?

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread Pedro Alves
On 01/18/2013 04:22 AM, Carlos O'Donell wrote: On Thu, Jan 17, 2013 at 11:20 PM, Mike Frysinger vap...@gentoo.org wrote: On Wednesday 16 January 2013 22:15:38 David Miller wrote: From: Carlos O'Donell car...@systemhalted.org Date: Wed, 16 Jan 2013 21:15:03 -0500 +/* If a glibc-based

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-18 Thread Carlos O'Donell
On 01/18/2013 05:44 AM, Pedro Alves wrote: On 01/18/2013 04:22 AM, Carlos O'Donell wrote: On Thu, Jan 17, 2013 at 11:20 PM, Mike Frysinger vap...@gentoo.org wrote: On Wednesday 16 January 2013 22:15:38 David Miller wrote: From: Carlos O'Donell car...@systemhalted.org Date: Wed, 16 Jan 2013

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-17 Thread Jan Engelhardt
On Thursday 2013-01-17 03:05, David Miller wrote: From: Carlos O'Donell car...@systemhalted.org Date: Wed, 16 Jan 2013 20:58:47 -0500 So I just went down the rabbit hole, and the further I get the closer I get to having two exact copies of the same definitions in both glibc and the kernel and

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-17 Thread David Miller
From: Mike Frysinger vap...@gentoo.org Date: Thu, 17 Jan 2013 23:14:31 -0500 the kernel already exports many types with a __kernel_ prefix. i changed the kernel headers in Gentoo for a few releases (2.6.28 - 2.6.34) to do the same thing to pretty much all the networking headers. a few

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-17 Thread Carlos O'Donell
On Thu, Jan 17, 2013 at 11:20 PM, Mike Frysinger vap...@gentoo.org wrote: On Wednesday 16 January 2013 22:15:38 David Miller wrote: From: Carlos O'Donell car...@systemhalted.org Date: Wed, 16 Jan 2013 21:15:03 -0500 +/* If a glibc-based userspace has already included in.h, then we will not

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-17 Thread Carlos O'Donell
On 01/16/2013 10:22 PM, YOSHIFUJI Hideaki wrote: Carlos O'Donell wrote: diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index f79c372..a2b16a5 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h @@ -23,6 +23,13 @@ #include linux/types.h +/* If a

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread YOSHIFUJI Hideaki
Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file inet/netinet/in.h and kernel source file include/uapi/linux/in6.h, both define struct in6_addr, and both are visible to user applications. Thomas reported a conflict below. So, how can we handle this? /me is

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Ben Hutchings
On Wed, 2013-01-16 at 23:21 +0900, YOSHIFUJI Hideaki wrote: Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file inet/netinet/in.h and kernel source file include/uapi/linux/in6.h, both define struct in6_addr, and both are visible to user applications.

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Ben Hutchings
On Wed, 2013-01-16 at 12:04 -0500, Mike Frysinger wrote: On Wednesday 16 January 2013 10:47:12 Ben Hutchings wrote: On Wed, 2013-01-16 at 23:21 +0900, YOSHIFUJI Hideaki wrote: Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Mike Frysinger vap...@gentoo.org Date: Wed, 16 Jan 2013 14:22:16 -0500 On Wednesday 16 January 2013 13:59:59 David Miller wrote: This has been done for decades, wake up. and it's been broken for just as long. no need to be a dick. By being ignorant and having such a simplistic view

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Mike Frysinger vap...@gentoo.org Date: Wed, 16 Jan 2013 12:04:56 -0500 certainly true, but the current expectation is that you don't mix your ABIs. if you're programming with the C library API, then use the C library headers. if you're banging directly on the kernel, then use the

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Mike Frysinger vap...@gentoo.org Date: Wed, 16 Jan 2013 12:28:39 -0500 if you're not calling the kernel directly, why are you including the kernel headers ? what is the problem people are actually trying to address here (and no, i want to include both headers is not the answer) ?

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Ben Hutchings bhutchi...@solarflare.com Date: Wed, 16 Jan 2013 15:47:12 + On Wed, 2013-01-16 at 23:21 +0900, YOSHIFUJI Hideaki wrote: Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file inet/netinet/in.h and kernel source file

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Carlos O'Donell car...@systemhalted.org Date: Wed, 16 Jan 2013 20:58:47 -0500 So I just went down the rabbit hole, and the further I get the closer I get to having two exact copies of the same definitions in both glibc and the kernel and using whichever one was included first. Is

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread YOSHIFUJI Hideaki
Carlos O'Donell wrote: diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index f79c372..a2b16a5 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h : #define IPV6_PRIORITY_14 0x0e00 #define IPV6_PRIORITY_15 0x0f00 + +#ifndef

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread David Miller
From: Carlos O'Donell car...@systemhalted.org 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

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread YOSHIFUJI Hideaki
Carlos O'Donell wrote: diff --git a/include/uapi/linux/in6.h b/include/uapi/linux/in6.h index f79c372..a2b16a5 100644 --- a/include/uapi/linux/in6.h +++ b/include/uapi/linux/in6.h @@ -23,6 +23,13 @@ #include linux/types.h +/* If a glibc-based userspace has already included in.h, then

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Cong Wang
On Wed, 2013-01-16 at 14:22 -0500, Mike Frysinger wrote: but this is still too vague. what headers/definitions do people want to see simultaneously included ? changes would be needed on both sides (kernel C library). Hi, Mike, Please take a look at my first email in this thread. The

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Jike Song
On Thu, Jan 17, 2013 at 2:59 AM, David Miller da...@davemloft.net wrote: When GLIBC doesn't provide it's own definition of some networking macros or interfaces that the kernel provides, people include the kernel header. Recently I got a problem when copying a structure from kernel to

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Carlos O'Donell
On 01/16/2013 04:45 PM, David Miller wrote: From: Ben Hutchings bhutchi...@solarflare.com Date: Wed, 16 Jan 2013 15:47:12 + On Wed, 2013-01-16 at 23:21 +0900, YOSHIFUJI Hideaki wrote: Cong Wang wrote: (Cc'ing some glibc developers...) Hello, In glibc source file inet/netinet/in.h

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Carlos O'Donell
On 01/16/2013 01:57 PM, David Miller wrote: From: Mike Frysinger vap...@gentoo.org Date: Wed, 16 Jan 2013 12:04:56 -0500 certainly true, but the current expectation is that you don't mix your ABIs. if you're programming with the C library API, then use the C library headers. if

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Cong Wang
On Thu, 2013-01-17 at 11:55 +0800, Jike Song wrote: On Thu, Jan 17, 2013 at 2:59 AM, David Miller da...@davemloft.net wrote: When GLIBC doesn't provide it's own definition of some networking macros or interfaces that the kernel provides, people include the kernel header. Recently I

Re: [libvirt] Redefinition of struct in6_addr in netinet/in.h and linux/in6.h

2013-01-16 Thread Cong Wang
- Original Message - I see no reason, even although I don't know why it is 46 instead of 40. Ok, for ::::::255.255.255.255. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list