diff options
author | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2004-04-11 12:03:57 (GMT) |
---|---|---|
committer | Andrew MacIntyre <andymac@bullseye.apana.org.au> | 2004-04-11 12:03:57 (GMT) |
commit | daedf218524e1c96c289f1785c8f5092642b79ea (patch) | |
tree | 95170e8e96177f059f9bd18bc50faf5c8c101610 /Modules/socketmodule.c | |
parent | cf6f1b69eb5f491dd3cba6c5c90bcb344d4b3a96 (diff) | |
download | cpython-daedf218524e1c96c289f1785c8f5092642b79ea.zip cpython-daedf218524e1c96c289f1785c8f5092642b79ea.tar.gz cpython-daedf218524e1c96c289f1785c8f5092642b79ea.tar.bz2 |
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.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index d973033..0989171 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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 */ |