Skip to content

Commit 77454fd

Browse files
committed
_multiprocessing module fix.
1 parent dc1eb3c commit 77454fd

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

python3-alpha/python3-src/Modules/_multiprocessing/multiprocessing.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ multiprocessing_sendfd(PyObject *self, PyObject *args)
122122
cmsg->cmsg_type = SCM_RIGHTS;
123123
cmsg->cmsg_len = CMSG_LEN(sizeof(int));
124124
msg.msg_controllen = cmsg->cmsg_len;
125-
*CMSG_DATA(cmsg) = fd;
125+
*(int*)CMSG_DATA(cmsg) = fd;
126126

127127
Py_BEGIN_ALLOW_THREADS
128128
res = sendmsg(conn, &msg, 0);
@@ -165,7 +165,7 @@ multiprocessing_recvfd(PyObject *self, PyObject *args)
165165
if (res < 0)
166166
return PyErr_SetFromErrno(PyExc_OSError);
167167

168-
fd = *CMSG_DATA(cmsg);
168+
fd = *(int*)CMSG_DATA(cmsg);
169169
return Py_BuildValue("i", fd);
170170
}
171171

python3-alpha/python3-src/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
2828

2929
# This global variable is used to hold the list of modules to be disabled.
30-
disabled_module_list = ['ossaudiodev', '_multiprocessing', 'nis']
30+
disabled_module_list = ['ossaudiodev', 'nis']
3131

3232
# File which contains the directory for shared mods (for sys.path fixup
3333
# when running from the build dir, see Modules/getpath.c)

0 commit comments

Comments
 (0)