apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52065] New: redeclaration of structs in apr.h
Date Thu, 20 Oct 2011 12:25:08 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52065

             Bug #: 52065
           Summary: redeclaration of structs in apr.h
           Product: APR
           Version: HEAD
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: razvan_zarzu@yahoo.com
    Classification: Unclassified


Created attachment 27827
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=27827
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.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message