mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Avoid problem if system doesn't define MSG_DONTWAIT
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25216 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e6350bd616
commit
9f67e8bf5e
2 changed files with 9 additions and 0 deletions
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue