#850 can't support ipv6 when compile with mingw

version 3.0.19
closed
Fabian Keil
5
2012-02-21
2012-01-30
ir193
No

hi,
apologize if i post duplicate. I'm new to sf.net

I'm using mingw32(gcc 4.3.3) and windows7sp1 to compile privoxy. have two problem:
1. got an error

jbsockets.c: In function ‘get_host_information’:
jbsockets.c:979:22: error: ‘NI_MAXSERV’ undeclared (first use in this function)
jbsockets.c:979:22: note: each undeclared identifier is reported only once for e
ach function it appears in
make: *** [jbsockets.o] Error 1

2. after edit the source:
#define NI_MAXSERV 32
i compile successfully. But it didin't support IPV6.

I wonder whether it a bug of configure or I miss some package

Discussion

1 2 > >> (Page 1 of 2)
  • Fabian Keil
    Fabian Keil
    2012-02-02

    • status: open --> pending
     
  • Fabian Keil
    Fabian Keil
    2012-02-02

    The missing NI_MAXSERV definition is a bug that is already worked around in CVS. Unfortunately it wasn't discovered until after the 3.0.19 release.

    This should only be a problem when Privoxy is compiled on Windows without IPv6 support, though.

    Are you configuring with --enable-mingw32?
    Can you attach the configure output?

     
  • ir193
    ir193
    2012-02-15

    configure output

     
    Attachments
  • ir193
    ir193
    2012-02-15

    • status: pending --> open
     
  • ir193
    ir193
    2012-02-15

    I think it's because getaddrinfo need _WIN32_WINNT >= 0x0501
    and there is no _WIN32_WINNT defined when configure
    you can work around this.

     
  • Fabian Keil
    Fabian Keil
    2012-02-19

    • status: open --> pending
     
  • Fabian Keil
    Fabian Keil
    2012-02-19

    Strange. In the past setting WINVER seems to have been sufficient. Can you try adding _WIN32_WINNT?

    --- configure.in
    +++ configure.in
    @@ -299,7 +299,7 @@ fi])

    if test $target_type = mingw; then
    WIN_ONLY=
    - CFLAGS="$CFLAGS -DWINVER=0x501"
    + CFLAGS="$CFLAGS -DWINVER=0x501 -D_WIN32_WINNT=0x501"
    SPECIAL_CFLAGS="-mwindows -mno-cygwin"
    PTHREAD_LIB=-lpthreadGC
    echo "Using mingw32 (Win32 GUI)"

    Is this the workaround you were thinking of?

     
  • ir193
    ir193
    2012-02-21

    • status: pending --> open
     
  • ir193
    ir193
    2012-02-21

    I'm really sorry. I installed a latest MSYS. The problem disappeared. It seems the older gcc cause the problem.

     
  • Fabian Keil
    Fabian Keil
    2012-02-21

    • assigned_to: nobody --> fabiankeil
    • status: open --> closed
     
1 2 > >> (Page 1 of 2)