From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: Redefinition of struct in6_addr in and Date: Thu, 17 Jan 2013 14:59:13 +0800 Message-ID: <1358405953.2547.3.camel@cr0> References: <201301161205.04502.vapier@gentoo.org> <1358356211.2923.25.camel@bwh-desktop.uk.solarflarecom.com> <201301161228.42592.vapier@gentoo.org> <20130116.135959.90676245194307972.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: David Miller , vapier@gentoo.org, bhutchings@solarflare.com, libc-alpha@sourceware.org, yoshfuji@linux-ipv6.org, tmb@mageia.org, eblake@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, libvirt-list@redhat.com, tgraf@suug.ch, schwab@suse.de, carlos@systemhalted.org To: Jike Song Return-path: In-Reply-To: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org List-Id: netdev.vger.kernel.org On Thu, 2013-01-17 at 11:55 +0800, Jike Song wrote: > On Thu, Jan 17, 2013 at 2:59 AM, David Miller 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 userspace, > after debugging I found: > > kernel: include/linux/inet.h > > #define INET6_ADDRSTRLEN (48) > > glibc: /usr/include/netinet/in.h > > #define INET6_ADDRSTRLEN 46 > > > Any reason to differentiate them from each other? > I see no reason, even although I don't know why it is 46 instead of 40. But include/linux/inet.h is not exported to user-space, AFAIK.