mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Work around missing getsockopt support in hurd.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39922 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d9d4cd2982
commit
39c966a12f
2 changed files with 8 additions and 1 deletions
|
@ -2,7 +2,8 @@
|
|||
|
||||
* Source/NSMessagePort.m:
|
||||
* config/config.reuseaddr.c:
|
||||
SO_REUSEADDR fixes.
|
||||
Hack to work around Hurd local domain socket bug.
|
||||
Plus don't try to set SO_REUSEADDR on local domain sockets anyway.
|
||||
|
||||
2016-06-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -893,6 +893,11 @@ static Class runLoopClass;
|
|||
int res = 0;
|
||||
unsigned len = sizeof(res);
|
||||
|
||||
/* Currently gnu hurd doesn't support getsockopt on local domain sockets
|
||||
* and fails with a 'protocol not supported' error.
|
||||
* We therefore just hope the connect was a success.
|
||||
*/
|
||||
#if !defined(__gnu_hurd__)
|
||||
if (getsockopt(desc, SOL_SOCKET, SO_ERROR, (char*)&res, &len) != 0)
|
||||
{
|
||||
state = GS_H_UNCON;
|
||||
|
@ -905,6 +910,7 @@ static Class runLoopClass;
|
|||
[NSError _systemError: res]);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
NSData *d = newDataWithEncodedPort([self recvPort]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue