diff --git a/ChangeLog b/ChangeLog index 7b14a165a..5824a181f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-11 Richard Frith-Macdonald + + * Applied Willem Rein Oudshoorn's fix for bug #11055, having tested it + and found it OK on windows-xp as well as the windows-2003 system he + was using. + 2005-11-11 Richard Frith-Macdonald * Source/win32/NSMessagePortNameServerWin32.m: fix port lookup in case diff --git a/Tools/gdomap.c b/Tools/gdomap.c index 5da7c8d48..a1b78f5b1 100644 --- a/Tools/gdomap.c +++ b/Tools/gdomap.c @@ -2791,14 +2791,27 @@ handle_request(int desc) memset(&sa, '\0', sizeof(sa)); sa.sin_family = AF_INET; - /* FIXME: This must not be INADDR_ANY on Win, - otherwise the system will try to bind on any of - the local addresses (including 127.0.0.1), which - works. - bjoern */ -#ifdef __MINGW32__ - sa.sin_addr.s_addr = addr[0].s_addr; -#else + +#if defined(__MINGW32__) + /* COMMENT: (3 Nov 2004 by Wim Oudshoorn): + The comment below might be true. But + using addr[0].s_addr has on windows 2003 server + (and some other versions of windows.) + exactly the same sympton as it tries to avoid. + The funny thing is that the original line, just + using INADDR_ANY seems to work on windows. + However, I assume the FIXME below was put there + for a reason. But for now I just revert it because + the platform independent code seems to work. + */ + /* FIXME: This must not be INADDR_ANY on Win, + otherwise the system will try to bind on any of + the local addresses (including 127.0.0.1), which + works. - bjoern */ +/* sa.sin_addr.s_addr = addr[0].s_addr; */ sa.sin_addr.s_addr = htonl(INADDR_ANY); +#else + sa.sin_addr.s_addr = htonl(INADDR_ANY); #endif /* __MINGW32__ */ sa.sin_port = htons(p); result = bind(sock, (void*)&sa, sizeof(sa));