diff --git a/ChangeLog b/ChangeLog index dfdbb20ba..b5ffa0d5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-06-03 Richard Frith-Macdonald + + * Source/GSHTTPURLHandle.m: define MSG_DONTWAIT as zero if it's not + defined ... it should not be needed anyway if the socket is already + non-blocking. + 2007-06-03 Richard Frith-Macdonald * Source/win32/GSFileHandleWin32.m: Clean up indentation issues etc. diff --git a/Source/GSHTTPURLHandle.m b/Source/GSHTTPURLHandle.m index 7d9851587..0e3cd9f8e 100644 --- a/Source/GSHTTPURLHandle.m +++ b/Source/GSHTTPURLHandle.m @@ -1281,6 +1281,9 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data) int result; unsigned char c; +#if !defined(MSG_DONTWAIT) +#define MSG_DONTWAIT 0 +#endif result = recv(fd, &c, 1, MSG_PEEK | MSG_DONTWAIT); if (result == 0 || (result < 0 && errno != EAGAIN && errno != EINTR)) {