Re: [xml] 2.5.8 wont compile http and ftp on system w/o ipv6



On Mon, Jul 07, 2003 at 08:06:13AM +0200, Peter Sobisch wrote:
Hi,

the newest release 2.5.8 will not compile nanohttp and nanoftp on solaris
2.6 (without ipv6):

gcc -DHAVE_CONFIG_H -I. -I. -I. -I./include -I./include -D_REENTRANT -g -O2 -Wall -c nanoftp.c  -fPIC -DPIC 
-o .libs/nanoftp.lo
nanoftp.c:98: field `ftpAddr' has incomplete type
nanoftp.c: In function `have_ipv6':
nanoftp.c:125: `AF_INET6' undeclared (first use in this function)

  Hum, configure does the following check:

if test $enable_ipv6 = yes; then
  have_ipv6=no
  AC_TRY_COMPILE([
    #include <sys/socket.h>
    #include <sys/types.h>], [
    struct sockaddr_storage ss;
    socket(AF_INET6, SOCK_STREAM, 0)
    ],
    have_ipv6=yes,
    have_ipv6=no
  )
  AC_MSG_RESULT($have_ipv6)
                                                                                
  if test $have_ipv6=yes; then
    AC_DEFINE(SUPPORT_IP6)

and the failing code is protected with #ifdef SUPPORT_IP6
so it seems that the modules don't import <sys/socket.h> and
<sys/types.h> . Try to add 
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

  at the beginning of the 2 modules 

I have to disable http and ftp first to be able to compile it at all.

  No, configuring with --disable-ipv6 should be sufficient to avoid the
problem...

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]