mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Fixes for AF_UNIX support on OS/2:
- return the full size of the sockaddr_un structure, without which bind() fails with EINVAL; - set test_socketserver to use a socket name that meets the form required by the underlying implementation; - don't bother exercising the forking AF_UNIX tests on EMX - its fork() can't handle the stress.
This commit is contained in:
parent
cf6f1b69eb
commit
daedf21852
2 changed files with 23 additions and 4 deletions
|
@ -966,7 +966,11 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
|
|||
memcpy(addr->sun_path, path, len);
|
||||
addr->sun_path[len] = 0;
|
||||
*addr_ret = (struct sockaddr *) addr;
|
||||
#if defined(PYOS_OS2)
|
||||
*len_ret = sizeof(*addr);
|
||||
#else
|
||||
*len_ret = len + sizeof(*addr) - sizeof(addr->sun_path);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
#endif /* AF_UNIX */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue