Created attachment 27827 [details] The error output from make I get the following error when running make in the Apache httpd-2.2.21 folder (running Cygwin): /bin/sh /home/[removed]/httpd-2.2.21/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -DHAVE_CONFIG_H -DCYGWIN -I./include -I/home/Razvan/httpd-2.2.21/srclib/apr/include/arch/unix -I./include/arch/unix -I/home/Razvan/httpd-2.2.21/srclib/apr/include/arch/unix -I/home/Razvan/httpd-2.2.21/srclib/apr/include -o strings/apr_snprintf.lo -c strings/apr_snprintf.c && touch strings/apr_snprintf.lo In file included from /usr/include/sys/socket.h:16, from ./include/apr.h:168, from strings/apr_snprintf.c:17: /usr/include/cygwin/socket.h:29: error: redefinition of `struct sockaddr' /usr/include/cygwin/socket.h:41: error: redefinition of `struct sockaddr_storage' It seems running on Cygwin includes both the Windows file, which is located at /usr/include/w32api/winsock.h (or /usr/include/w32/winsock2.h), and the /usr/include/sys/socket.h, causing some redeclarations for the two structs above and also for most of the functions (see error.log attached). One possible solution would be to change apr.h.in and count also for the case when there is Cygwin. So change this: 167 #if APR_HAVE_SYS_SOCKET_H 168 #include <sys/socket.h> 169 #endif in apr.h.in to something like (CYGWIN needs to be defined by ./configure, I guess(?)): 167 #if APR_HAVE_SYS_SOCKET_H && !CYGWIN 168 #include <sys/socket.h> 169 #endif Also, this redeclaration problem appears in other header files. Thank you.
Just to spare you a bunch of frustration, apr hasn't been particularly well synchronized with cygwin, given that this would be an abstraction layer upon layer upon layer on top of ntdll (apr, cyg, win32). Plenty of opportunity for flaws. There has been some effort in integrating apr for mingw/msys and you might have a more pleasant experience with that.