# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../musl/pkg/python/python-fix-posix-close-clash.patch # Copyright (C) 2014 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- -------------------------------------------------------------------------------- ./Modules/posixmodule.c:6585:1: error: conflicting types for 'posix_close' In file included from Include/Python.h:44:0, from ./Modules/posixmodule.c:28: /usr/include/unistd.h:38:5: note: previous declaration of 'posix_close' was here -------------------------------------------------------------------------------- The patch originally comes from https://github.com/sabotage-linux/sabotage/ --- a/Modules/posixmodule.c 2014-03-20 17:50:48.774208443 +0100 +++ b/Modules/posixmodule.c 2014-03-20 17:52:38.080729474 +0100 @@ -6582,7 +6582,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)) @@ -8960,7 +8960,7 @@ {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__}, #endif /* HAVE_TCSETPGRP */ {"open", posix_open, METH_VARARGS, posix_open__doc__}, - {"close", posix_close, METH_VARARGS, posix_close__doc__}, + {"close", posix_closex, METH_VARARGS, posix_close__doc__}, {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__}, {"dup", posix_dup, METH_VARARGS, posix_dup__doc__}, {"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__},