X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; q=dns; s=default; b=APOtmi2BgFoaxR4+ 8sxAfJvW07ZmG1RIhGjv2r4cmUzvI7SAsmhfdldzTFpN7qteLQ6QGrGE33qRV1LT 0fBEjApK0QN7I3VRNT090FokZv5Ric3ugdoEB7NMBH6gZ8d+BJj7G0XtfMCM0grf 7jRZWx7H968WqXI0mN2edM2EQzc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type :content-transfer-encoding; s=default; bh=RcB749i0L4cAnv6aKfhFM7 wY0M8=; b=BtSIhe3cfmHkxYvmC08zga0eaJwjlBbb+8pIepi2ZvnLgjq8jDJpJy JudCX/CEvz/U9F+KgrAkzMxKsOVSfKIBchXJUv+erd9LG0RNpqd6iNKZTtasyyoA 3vvYwJuW5coqLgMb8kjdIkit9n/NKVE7/IfNvl6cpgWzC/zMbAn5Y= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS,TW_GD autolearn=ham version=3.3.1 MIME-Version: 1.0 X-Received: by 10.182.231.197 with SMTP id ti5mr14036794obc.64.1366824402609; Wed, 24 Apr 2013 10:26:42 -0700 (PDT) In-Reply-To: References: <20130424154409 DOT GX26397 AT calimero DOT vinschen DOT de> Date: Wed, 24 Apr 2013 19:26:42 +0200 Message-ID: Subject: Re: Redefinition of `struct in6_addr'? From: Max Balduino To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id r3OHQvBN012473 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 AT 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. > > I'm trying to compile an app, that's why I was posting on cygwin-apps > AT cygwin DOT com. You can find it at > http://www.unix-ag.uni-kl.de/~massar/vpnc/ it's a cisco-compatible vpn > client. > > I'm not sure what did you mean "a simple testcase would be helpful"? > If it's the piece of code, then Here it is: > > from sysdep.h: > > > #ifndef __SYSDEP_H__ > #define __SYSDEP_H__ > > /* > * Different systems define different macros. > * For vpnc, this list should be used as > * reference: > * > * __linux__ > * __NetBSD__ > * __OpenBSD__ > * __FreeBSD__ > * __DragonFly__ > * __APPLE__ Darwin / MacOS X > * __sun__ SunOS / Solaris > * __CYGWIN__ > * __SKYOS__ > * > */ > > #include > #include > #include > > #if !defined(__CYGWIN__) > #include > #include > #include > #endif > > #include "config.h" > > int tun_open(char *dev, enum if_mode_enum mode); > int tun_close(int fd, char *dev); > int tun_write(int fd, unsigned char *buf, int len); > int tun_read(int fd, unsigned char *buf, int len); > int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr); > > /***************************************************************************/ > #if defined(__linux__) || defined(__GLIBC__) > #include > > #define HAVE_VASPRINTF 1 > #define HAVE_ASPRINTF 1 > #define HAVE_ERROR 1 > #define HAVE_GETLINE 1 > #define HAVE_UNSETENV 1 > #define HAVE_SETENV 1 > #endif > ... > > > As of the complete gcc error dump, here it also is: > > userwinemt AT ioxp /usr/src/vpnc-0.5.3 > $ make install > gcc -O3 -g -W -Wall -Wmissing-declarations -Wwrite-strings > -DVERSION=\"0.5.3\" -c -o sysdep.o sysdep.c > In file included from /usr/include/cygwin/in.h:267:0, > from /usr/include/netinet/in.h:14, > from sysdep.h:23, > from sysdep.c:71: > /usr/include/cygwin/in6.h:75:8: error: redefinition of ‘struct in6_addr’ > /usr/lib/gcc/i686-pc-cygwin/4.5.3/../../../../include/w32api/in6addr.h:17:16: > note: originally defined here > In file included from sysdep.h:31:0, > from sysdep.c:71: > config.h:131:83: warning: ‘struct debug_strings’ declared inside parameter list > config.h:131:83: warning: its scope is only this definition or > declaration, which is probably not what you want > sysdep.c: In function ‘search_if’: > sysdep.c:216:4: warning: pointer targets in passing argument 5 of > ‘RegQueryValueExA’ differ in signedness > /usr/include/w32api/winreg.h:183:25: note: expected ‘LPBYTE’ but > argument is of type ‘char *’ > sysdep.c: In function ‘tun_open’: > sysdep.c:392:4: warning: pointer targets in passing argument 5 of > ‘RegQueryValueExA’ differ in signedness > /usr/include/w32api/winreg.h:183:25: note: expected ‘LPBYTE’ but > argument is of type ‘char *’ > sysdep.c:400:4: warning: pointer targets in passing argument 5 of > ‘RegQueryValueExA’ differ in signedness > /usr/include/w32api/winreg.h:183:25: note: expected ‘LPBYTE’ but > argument is of type ‘char *’ > : recipe for target `sysdep.o' failed > make: *** [sysdep.o] Error 1 > > As I told, this is not my own code. I could check if it compiles on > debian Wheezy, if you think it's worth... > > BR, > Max. OK, I'm moving the thread in the right mailing list... Something I forgot to mention is that I'm on XP Pro 64 bits, could that be of some influence? I tried to compile with x86_64-w64-mingw32-gcc, but then I get a lot of missing libraries... I'll more than appreciate any help! :-) BR, Max. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple