diff options
author | Khem Raj <raj.khem@gmail.com> | 2014-08-14 02:27:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-08-15 18:21:48 +0100 |
commit | 0670cecb5bec5f09568d022bd87980e47b854f8d (patch) | |
tree | 08aea4b744d43f7774dcae8933d581f6fc297d25 /meta | |
parent | 9c1ea582496a6c6597bc7a5301101e11d9b91c3d (diff) | |
download | poky-0670cecb5bec5f09568d022bd87980e47b854f8d.tar.gz |
python: Fix build on musl
musl has posix_close which conflicts in python
so lets rename it.
(From OE-Core rev: 9de4f6eb07696f618d4762c6eeb34dc9ea3080bd)
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.patch | 43 | ||||
-rw-r--r-- | meta/recipes-devtools/python/python_2.7.3.bb | 1 |
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 @@ | |||
1 | backport from http://bugs.python.org/issue20594 | ||
2 | |||
3 | - Issue #20594: Avoid name clash with the libc function posix_close. | ||
4 | |||
5 | Upstream-Status: Backport | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | |||
8 | |||
9 | # HG changeset patch | ||
10 | # User Benjamin Peterson <benjamin@python.org> | ||
11 | # Date 1392131776 18000 | ||
12 | # Node ID 1d253360d5a6d8d987fb2480e26f4fcc2d730932 | ||
13 | # Parent 41e49f1c5bd8ff48a6c18804c958e82c659daab3 | ||
14 | avoid name clash with posix_close (closes #20594) | ||
15 | |||
16 | diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c | ||
17 | --- a/Modules/posixmodule.c | ||
18 | +++ b/Modules/posixmodule.c | ||
19 | @@ -6581,8 +6581,12 @@ PyDoc_STRVAR(posix_close__doc__, | ||
20 | "close(fd)\n\n\ | ||
21 | Close a file descriptor (for low level IO)."); | ||
22 | |||
23 | -static PyObject * | ||
24 | -posix_close(PyObject *self, PyObject *args) | ||
25 | +/* | ||
26 | +The underscore at end of function name avoids a name clash with the libc | ||
27 | +function posix_close. | ||
28 | +*/ | ||
29 | +static PyObject * | ||
30 | +posix_close_(PyObject *self, PyObject *args) | ||
31 | { | ||
32 | int fd, res; | ||
33 | if (!PyArg_ParseTuple(args, "i:close", &fd)) | ||
34 | @@ -8960,7 +8964,7 @@ static PyMethodDef posix_methods[] = { | ||
35 | {"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__}, | ||
36 | #endif /* HAVE_TCSETPGRP */ | ||
37 | {"open", posix_open, METH_VARARGS, posix_open__doc__}, | ||
38 | - {"close", posix_close, METH_VARARGS, posix_close__doc__}, | ||
39 | + {"close", posix_close_, METH_VARARGS, posix_close__doc__}, | ||
40 | {"closerange", posix_closerange, METH_VARARGS, posix_closerange__doc__}, | ||
41 | {"dup", posix_dup, METH_VARARGS, posix_dup__doc__}, | ||
42 | {"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__}, | ||
43 | |||
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 += "\ | |||
37 | file://python-fix-build-error-with-Readline-6.3.patch \ | 37 | file://python-fix-build-error-with-Readline-6.3.patch \ |
38 | file://python-2.7.3-CVE-2014-1912.patch \ | 38 | file://python-2.7.3-CVE-2014-1912.patch \ |
39 | file://json-flaw-fix.patch \ | 39 | file://json-flaw-fix.patch \ |
40 | file://posix_close.patch \ | ||
40 | " | 41 | " |
41 | 42 | ||
42 | S = "${WORKDIR}/Python-${PV}" | 43 | S = "${WORKDIR}/Python-${PV}" |