> 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. 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: <code> #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 <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #if !defined(__CYGWIN__) #include <net/if.h> #include <net/if_arp.h> #include <netinet/if_ether.h> #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 <error.h> #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 ... </code> As of the complete gcc error dump, here it also is: userwinemt@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 *’ <builtin>: 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.
