Author ncopa
Recipients ncopa
Date 2014-02-11.12:20:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
This happens when building with musl libc:

./Modules/posixmodule.c:7849:1: error: conflicting types for 'posix_close'
 posix_close(PyObject *self, PyObject *args)
In file included from Include/Python.h:36:0,
                 from ./Modules/posixmodule.c:28:
/usr/include/unistd.h:38:5: note: previous declaration of 'posix_close' was here
 int posix_close(int, int);
Makefile:1511: recipe for target 'Modules/posixmodule.o' failed
make: *** [Modules/posixmodule.o] Error 1
make: *** Waiting for unfinished jobs....

Apparently 'posix_close' has made it to the POSIX standard so that name should be avoided in python's posix module.c.

Fix is trivial:
--- ./Modules/posixmodule.c.orig
+++ ./Modules/posixmodule.c
@@ -7846,7 +7846,7 @@
 Close a file descriptor (for low level IO).");
 static PyObject *
-posix_close(PyObject *self, PyObject *args)
+posix_closex(PyObject *self, PyObject *args)
     int fd, res;
     if (!PyArg_ParseTuple(args, "i:close", &fd))
@@ -11262,7 +11262,7 @@
     {"open",            (PyCFunction)posix_open,\
                         METH_VARARGS | METH_KEYWORDS,
-    {"close",           posix_close, METH_VARARGS, posix_close__doc__},
+    {"close",           posix_closex, METH_VARARGS, posix_close__doc__},
     {"closerange",      posix_closerange, METH_VARARGS, posix_closerange__doc__},
     {"device_encoding", device_encoding, METH_VARARGS, device_encoding__doc__},
     {"dup",             posix_dup, METH_VARARGS, posix_dup__doc__},
Date User Action Args
2014-02-11 12:20:08ncopasetrecipients: + ncopa
2014-02-11 12:20:08ncopasetmessageid: <>
2014-02-11 12:20:08ncopalinkissue20594 messages
2014-02-11 12:20:08ncopacreate