Home > error redefinition > error redefinition of struct in6_addr

Error Redefinition Of Struct In6_addr

org> Cc: libc-alpha sourceware org, netdev vger kernel org, linux-kernel vger kernel org, David, carlos systemhalted org, schwab suse de, tgraf suug ch, libvirt-list redhat com, Miller Subject: [libvirt] Redefinition of struct in6_addr in and Date: Wed, 16 Jan 2013 14:06:06 +0800 (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 wondering why we didn't see this before. Thanks. On Tue, 2013-01-15 at 12:55 +0200, Thomas Backlund wrote: > Cong Wang skrev 15.1.2013 12:11: > > > > Does the following patch help? > > > > $ git diff include/uapi/linux/if_bridge.h > > diff --git a/include/uapi/linux/if_bridge.h > > b/include/uapi/linux/if_bridge.h > > index 5db2975..653db23 100644 > > --- a/include/uapi/linux/if_bridge.h > > +++ b/include/uapi/linux/if_bridge.h > > @@ -14,6 +14,7 @@ > > #define _UAPI_LINUX_IF_BRIDGE_H > > > > #include > > +#include > > > > #define SYSFS_BRIDGE_ATTR "bridge" > > #define SYSFS_BRIDGE_FDB "brforward" > > > > Well, I suggested the same fix in the beginning of the thread > on netdev and lkml: "if_bridge.h: include in6.h for struct in6_addr use" > > as it seemed to fix the libvirt case > > but then asked it to be ignored after I tried to build connman, > and hit this conflict with glibc-2.17: > > In file included from /usr/include/arpa/inet.h:22:0, > from ./include/connman/inet.h:25, > from src/connman.h:128, > from src/tethering.c:40: > /usr/include/netinet/in.h:35:5: error: expected identifier before > numeric constant > /usr/include/netinet/in.h:197:8: error: redefinition of 'struct in6_addr' > In file included from /usr/include/linux/if_bridge.h:17:0, > from src/tethering.c:38: > /usr/include/linux/in6.h:30:8: note: originally defined here > In file included from /usr/include/arpa/inet.h:22:0, > from ./include/connman/inet.h:25, > from src/connman.h:128, > from src/tethering.c:40: > /usr/include/netinet/in.h:238:8: error: redefinition of 'struct > sockaddr_in6' > In file included from /usr/include/linux/if_bridge.h:17:0, > from src/tethering.c:38: > /usr/include/linux/in6.h:46:8: note: originally defined here > In file included from /usr/include/arpa/inet.h:22:0, > from ./include/connman/inet.h:25, > from src/connman.h:128, > from src/tethering.c:40: > /usr/include/netinet/in.h:274:8: error: redefinition of 'struct ipv6_mreq'

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it https://www.redhat.com/archives/libvir-list/2013-January/msg01084.html only takes a minute: Sign up Can not include “linux/in6.h” without errors on Ubuntu 12.10 up vote 3 down vote favorite I can not include the linux/in6.h header into my source code without getting these redefinition errors: In file included from mypmtud.cc:30:0: /usr/include/linux/in6.h:30:8: error: redefinition of ‘struct in6_addr’ In file included from /usr/include/netdb.h:28:0, from mypmtud.cc:23: /usr/include/netinet/in.h:198:8: error: previous definition of ‘struct http://stackoverflow.com/questions/14202261/can-not-include-linux-in6-h-without-errors-on-ubuntu-12-10 in6_addr’ In file included from mypmtud.cc:30:0: /usr/include/linux/in6.h:46:8: error: redefinition of ‘struct sockaddr_in6’ In file included from /usr/include/netdb.h:28:0, from mypmtud.cc:23: /usr/include/netinet/in.h:239:8: error: previous definition of ‘struct sockaddr_in6’ In file included from mypmtud.cc:30:0: /usr/include/linux/in6.h:54:8: error: redefinition of ‘struct ipv6_mreq’ In file included from /usr/include/netdb.h:28:0, from mypmtud.cc:23: /usr/include/netinet/in.h:275:8: error: previous definition of ‘struct ipv6_mreq’ make: *** [mypmtud] Error 1 How can I include the linux/in6.h file into my code? I need linux/in6.h for IPV6_DONTFRAG definition and setsockopt() to understand this option. All other header files i have included: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include I am running Ubuntu 12.10 on VirtualBox 4.2.6. c++ linux ubuntu ipv6 ipv4 share|improve this question edited Jan 7 '13 at 19:28 millimoose 27.2k54789 asked Jan 7 '13 at 18:57 Matej Koleják 638 I might be reading the error output wrong, but it seems like in.h includes in6.h for you. In that case, shouldn't you alre

`struct in6_addr'? From: "Larry Hall (Cygwin)" To: cygwin at cygwin dot com Date: Wed, 24 Apr 2013 14:37:38 -0400 Subject: https://cygwin.com/ml/cygwin/2013-04/msg00392.html Re: Redefinition of `struct in6_addr'? References: https://cygwin.com/ml/cygwin/2013-04/msg00382.html dot com> <20130424154409 dot GX26397 at calimero dot vinschen dot de> <20130424175107 dot GZ26397 at calimero dot vinschen dot de> <20130424175359 error redefinition dot GH5968 at type dot youpi dot perso dot aquilenet dot fr> <20130424181248 dot GA26397 at calimero dot vinschen dot de> Reply-to: cygwin at cygwin dot com On 4/24/2013 2:12 PM, Corinna Vinschen wrote: On Apr 24 19:53, Samuel Thibault wrote: Corinna Vinschen, le Wed 24 Apr 2013 19:51:07 +0200, a Ãcrit : /usr/include/cygwin/in6.h:75:8: error: redefinition error redefinition of of âstruct in6_addrâ /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/in6addr.h:17:16: note: originally defined here Don't know this file but this is a bug in config.h. struct in6_addr is defined in a system header, so it should not be gratuitously defined in a project header, especially if the definition collides with the right one from the system header. Mmm, but here it's w32api definition vs cygwin definition. Maybe I didn't read it exactly, but the bottom line here is, when building for Cygwin, either use the POSIX network headers (preferredly), or use winsock.h. Mixing them is not supported. Yeah, though this case is a bit buried, so it's not obvious. Also the code is from 2008, so I expect it has suffered some bit rot over time with respect to Cygwin. In any case, it looks like removing iphlpapi.h from sysdep.c solves the problem. -- Larry _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoyi

`struct in6_addr'? From: Max Balduino To: cygwin at cygwin dot com Date: Wed, 24 Apr 2013 19:26:42 +0200 Subject: Re: Redefinition of `struct in6_addr'? References: <20130424154409 dot GX26397 at calimero dot vinschen dot de> On Wed, Apr 24, 2013 at 6:15 PM, Max Balduino >> On Apr 24 17:34, Max Balduino wrote: >>> Dear all, >>> >>> Looks like there's something wrong here: >>> >>> userwinemt@ioxp /usr/src/vpnc-0.5.2 >>> $ make install >>> LC_ALL=C perl -w ./enum2debug.pl isakmp.h >vpnc-debug.c 2>vpnc-debug.h >>> gcc -O3 -g -W -Wall -Wmissing-declarations -Wwrite-strings >>> -DVERSION=\"0.5.2\" -c -o sysdep.o sysdep.c >>> In file included from /usr/include/cygwin/in.h:267, >>> from /usr/include/netinet/in.h:14, >>> from sysdep.h:23, >>> from sysdep.c:71: >>> /usr/include/cygwin/in6.h:76: error: redefinition of `struct in6_addr' >>> >>> I'm compiling vpnc-0.5.2 on a fresh cygwin environment, just >>> downloaded from stable distribution. I'm using gcc version 3.4.4 >>> (cygming special, gdc 0.12, using dmd 0.125). I've googled for it and >>> found a post reading "Problems with latest cygwin + latest sources" >>> that claims for the same error. >>> >>> Anybody has seen this before or has a quick workaround, please? >> >> - You are not using the right mailing list for this kind of question. >> Use the cygwin AT cygwin DOT com list instead. >> >> - You're using an old and outdated compiler. Install the gcc4 package >> instead. >> >> - You're missing to paste the entire error message. Gcc usually prints >> where the clashing definition is defined, too. But maybe that's just >> in gcc 4.x. >> >> - Last but not least, a simple testcase would be helpful. >> >> Without that I can only guess: The file includes winsock.h because >> it wrongly treats Cygwin as Windows environment. Don't do that. >> >> >> Corinna >> >> -- >> Corinna Vinschen Please, send mails regarding Cygwin to >> Cygwin Maintainer cygwin AT cygwin DOT com >> Red Hat > > First of all thanks a *LOT* for your quick answer! > > OK, sorry for having used the wrong mail-list! I re-compiled under gcc > version 4.5.3 (GCC) getting same result. >

 

Related content

apache make error redefinition

Apache Make Error Redefinition table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of Typedef gliststore a li li a href Error Redefinition Of C a li li a href Error Redefinition Of Default Argument a li ul td tr tbody table p contribution towards the costs p h id Error Redefinition Of Typedef gliststore p the time and effort that's going in this site and error redefinition of class building Thank You Steffen Apache Lounge is not sponsored by anyone Your donations will help to keep this error redefinition of class

c programming error redefinition of

C Programming Error Redefinition Of table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of Typedef a li li a href Error Redefinition Of class a li li a href Error Redefinition Of struct Iovec a li li a href Error Redefinition Of Default Argument a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the relatedl workings and policies of this site About Us Learn more error redefinition of class c about Stack

c compile error redefinition

C Compile Error Redefinition table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of Class C a li li a href Error Redefinition Of class a li li a href Error Redefinition Of struct a li li a href Error Redefinition Of Default Argument a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed relatedl answers to any questions you might have Meta p h id Error Redefinition Of Class C p Discuss the workings and policies of this site About Us Learn

c error redefinition

C Error Redefinition table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of Class C a li li a href Error Redefinition Of class a li li a href Error Redefinition Of Default Argument a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers relatedl to any questions you might have Meta Discuss the error redefinition of struct node workings and policies of this site About Us Learn more about Stack p h id Error Redefinition Of Class C p Overflow the

compile error redefinition

Compile Error Redefinition table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of class a li li a href Error Redefinition Of class a li li a href Error Redefinition Of struct a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any relatedl questions you might have Meta Discuss the workings error redefinition of typedef and policies of this site About Us Learn more about Stack Overflow error redefinition of typedef gliststore the company Business Learn more about hiring developers

error redefinition of nion semun

Error Redefinition Of Nion Semun p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site relatedl About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Compilation error Redefinition of union name

error redefinition different linkage

Error Redefinition Different Linkage table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of Typedef gliststore a li li a href Error Redefinition Of class a li li a href Error Redefinition Of struct a li li a href Error Redefinition Of struct Iovec a li ul td tr tbody table p here for a quick relatedl overview of the site Help Center Detailed answers error redefinition of typedef to any questions you might have Meta Discuss the p h id Error Redefinition Of Typedef gliststore p workings and policies of this

error redefinition of stat

Error Redefinition Of Stat table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of Typedef gliststore a li li a href Error Redefinition Of C a li li a href Error Redefinition Of Default Argument a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers relatedl to any questions you might have Meta Discuss error redefinition of typedef the workings and policies of this site About Us Learn more about p h id Error Redefinition Of Typedef gliststore p Stack Overflow the

error redefinition of typedef uintptr_t

Error Redefinition Of Typedef Uintptr t table id toc tbody tr td div id toctitle Contents div ul li a href Duplicate Typedef a li li a href Typedef Forward Declaration a li li a href Typedef Struct a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any relatedl questions you might have Meta Discuss the workings and typedef redefinition with different types xcode policies of this site About Us Learn more about Stack Overflow the typedef undef company Business Learn more about hiring developers or posting ads

error redefinition of

Error Redefinition Of p here for a quick overview of the site Help Center Detailed answers to any relatedl questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up GCC compiler error ldquo redefinition hellip previously defined

error redefinition

Error Redefinition table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of struct a li li a href Error Redefinition Of Class C a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of relatedl this site About Us Learn more about Stack Overflow the company error redefinition of typedef Business Learn more about hiring developers or posting ads with us Stack Overflow Questions error redefinition of class Jobs Documentation

error redefinition of previously declared here

Error Redefinition Of Previously Declared Here p here for a quick overview of the site Help Center Detailed answers to any questions you might have relatedl Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up C redifinition of' ' and

error redefinition different storage class

Error Redefinition Different Storage Class table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of class a li li a href Error Redefinition Of struct a li li a href Error Redefinition Of Typedef glistmodel a li ul td tr tbody table p resources Windows Server resources Programs MSDN subscriptions Overview Benefits Administrators Students relatedl Microsoft Imagine Microsoft Student Partners ISV Startups error redefinition of class c TechRewards Events Community Magazine Forums Blogs Channel Documentation APIs p h id Error Redefinition Of class p and reference Dev centers Retired content Samples We

error redefinition of group name

Error Redefinition Of Group Name table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of C a li li a href Error Redefinition Of struct a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the relatedl workings and policies of this site About Us Learn more error redefinition of typedef about Stack Overflow the company Business Learn more about hiring developers or posting ads error redefinition of typedef gliststore with us Stack Overflow

error redefinition of function c

Error Redefinition Of Function C table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of Typedef gliststore a li li a href Error Redefinition Of class a li li a href Error Redefinition Of struct Iovec a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and relatedl policies of this site About Us Learn more about Stack error redefinition of class c Overflow the company Business Learn more about hiring developers

error redefinition of main

Error Redefinition Of Main table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of class a li li a href Error Redefinition Of struct Iovec a li li a href Error Redefinition Of Default Argument a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions relatedl you might have Meta Discuss the workings and policies error redefinition of typedef of this site About Us Learn more about Stack Overflow the company error redefinition of typedef gliststore Business Learn more

error redefinition of truct timespec

Error Redefinition Of Truct Timespec p here for a quick overview of the site Help Center Detailed answers to any questions relatedl you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up resolving redefinition of timespec in time

error redefinition function

Error Redefinition Function table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of Typedef a li li a href Error Redefinition Of class a li li a href Error Redefinition Of struct a li li a href Error Redefinition Of struct Iovec a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have relatedl Meta Discuss the workings and policies of this site About redefinition of function error in c Us Learn more about Stack Overflow the

error redefinition different basic types

Error Redefinition Different Basic Types table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of C a li li a href Error Redefinition Of struct a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and relatedl policies of this site About Us Learn more about Stack Overflow error redefinition of typedef the company Business Learn more about hiring developers or posting ads with us Stack error redefinition of typedef gliststore Overflow

error redefinition of operator

Error Redefinition Of Operator table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of class a li li a href Error Redefinition Of class a li li a href Error Redefinition Of struct a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions relatedl you might have Meta Discuss the workings and policies error redefinition of typedef of this site About Us Learn more about Stack Overflow the company error redefinition of typedef gliststore Business Learn more about hiring

error redefinition of template class

Error Redefinition Of Template Class table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of class a li li a href Error Redefinition Of Typedef a li li a href Error Redefinition Of Typedef gliststore a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the relatedl workings and policies of this site About Us Learn more error redefinition of class c about Stack Overflow the company Business Learn more about hiring developers or

error redefinition make

Error Redefinition Make table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of Typedef gliststore a li li a href Error Redefinition Of C a li li a href Error Redefinition Of Default Argument a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and relatedl policies of this site About Us Learn more about Stack error redefinition of typedef Overflow the company Business Learn more about hiring developers or posting ads

error redefinition different

Error Redefinition Different table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of C a li li a href Error Redefinition Of struct a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site relatedl About Us Learn more about Stack Overflow the company Business Learn error redefinition of typedef more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags error redefinition of

error redefinition in c

Error Redefinition In C table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of class a li li a href Error Redefinition Of Default Argument a li li a href Error Redefinition Of Typedef glistmodel a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you might relatedl have Meta Discuss the workings and policies of this error redefinition of class c site About Us Learn more about Stack Overflow the company Business Learn error redefinition of typedef more

gcc error redefinition struct

Gcc Error Redefinition Struct table id toc tbody tr td div id toctitle Contents div ul li a href Error Redefinition Of C a li li a href C Undefined Reference a li li a href ifndef a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any relatedl questions you might have Meta Discuss the workings and p h id Error Redefinition Of C p policies of this site About Us Learn more about Stack Overflow the error redefinition of c company Business Learn more about hiring developers