aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2014-08-14 02:27:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-15 08:46:41 +0100
commit9de4f6eb07696f618d4762c6eeb34dc9ea3080bd (patch)
treeb15003a93e1a48e8572cf4c1916e66593560b5f8 /meta
parentb23a9c94e574fec0f0dcda498c1f5a0592114055 (diff)
downloadopenembedded-core-contrib-9de4f6eb07696f618d4762c6eeb34dc9ea3080bd.tar.gz
python: Fix build on musl
musl has posix_close which conflicts in python so lets rename it. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/python/python/posix_close.patch43
-rw-r--r--meta/recipes-devtools/python/python_2.7.3.bb1
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python/posix_close.patch b/meta/recipes-devtools/python/python/posix_close.patch
new file mode 100644
index 0000000000..725531a240
--- /dev/null
+++ b/meta/recipes-devtools/python/python/posix_close.patch
@@ -0,0 +1,43 @@
+backport from http://bugs.python.org/issue20594
+
+- Issue #20594: Avoid name clash with the libc function posix_close.
+
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+# HG changeset patch
+# User Benjamin Peterson <benjamin@python.org>
+# Date 1392131776 18000
+# Node ID 1d253360d5a6d8d987fb2480e26f4fcc2d730932
+# Parent 41e49f1c5bd8ff48a6c18804c958e82c659daab3
+avoid name clash with posix_close (closes #20594)
+
+diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
+--- a/Modules/posixmodule.c
++++ b/Modules/posixmodule.c
+@@ -6581,8 +6581,12 @@ PyDoc_STRVAR(posix_close__doc__,
+ "close(fd)\n\n\
+ Close a file descriptor (for low level IO).");
+
+-static PyObject *
+-posix_close(PyObject *self, PyObject *args)
++/*
++The underscore at end of function name avoids a name clash with the libc
++function posix_close.
++*/
++static PyObject *
++posix_close_(PyObject *self, PyObject *args)
+ {
+ int fd, res;
+ if (!PyArg_ParseTuple(args, "i:close", &fd))
+@@ -8960,7 +8964,7 @@ static PyMethodDef posix_methods[] = {
+ {"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_close_, 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__},
+
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index 5be9073829..58bccedb8f 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -37,6 +37,7 @@ SRC_URI += "\
file://python-fix-build-error-with-Readline-6.3.patch \
file://python-2.7.3-CVE-2014-1912.patch \
file://json-flaw-fix.patch \
+ file://posix_close.patch \
"
S = "${WORKDIR}/Python-${PV}"