Commit f9370487 authored by Martin v. Löwis's avatar Martin v. Löwis

Patch #1191065: Fix preprocessor problems on systems where recvfrom

is a macro.
parent b10410c8
...@@ -48,6 +48,9 @@ Core and builtins ...@@ -48,6 +48,9 @@ Core and builtins
Extension Modules Extension Modules
----------------- -----------------
- Patch #1191065: Fix preprocessor problems on systems where recvfrom
is a macro.
- Bug #1467952: os.listdir() now correctly raises an error if readdir() - Bug #1467952: os.listdir() now correctly raises an error if readdir()
fails with an error condition. fails with an error condition.
......
...@@ -2208,18 +2208,20 @@ sock_recvfrom(PySocketSockObject *s, PyObject *args) ...@@ -2208,18 +2208,20 @@ sock_recvfrom(PySocketSockObject *s, PyObject *args)
Py_BEGIN_ALLOW_THREADS Py_BEGIN_ALLOW_THREADS
memset(&addrbuf, 0, addrlen); memset(&addrbuf, 0, addrlen);
timeout = internal_select(s, 0); timeout = internal_select(s, 0);
if (!timeout) if (!timeout) {
n = recvfrom(s->sock_fd, PyString_AS_STRING(buf), len, flags,
#ifndef MS_WINDOWS #ifndef MS_WINDOWS
#if defined(PYOS_OS2) && !defined(PYCC_GCC) #if defined(PYOS_OS2) && !defined(PYCC_GCC)
(struct sockaddr *) &addrbuf, &addrlen n = recvfrom(s->sock_fd, PyString_AS_STRING(buf), len, flags,
(struct sockaddr *) &addrbuf, &addrlen);
#else #else
(void *) &addrbuf, &addrlen n = recvfrom(s->sock_fd, PyString_AS_STRING(buf), len, flags,
(void *) &addrbuf, &addrlen);
#endif #endif
#else #else
(struct sockaddr *) &addrbuf, &addrlen n = recvfrom(s->sock_fd, PyString_AS_STRING(buf), len, flags,
(struct sockaddr *) &addrbuf, &addrlen);
#endif #endif
); }
Py_END_ALLOW_THREADS Py_END_ALLOW_THREADS
if (timeout) { if (timeout) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment