From: Elan Ruusamäe Date: Thu, 26 Jul 2012 08:36:34 +0000 (+0300) Subject: define O_CLOEXEC on old libc X-Git-Tag: auto/th/python3-3.2.3-6~6 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=2a419ad650520f6fcfc8841f3330f413e3fe21c9;p=packages%2Fpython3.git define O_CLOEXEC on old libc --- diff --git a/libc-cloexec.patch b/libc-cloexec.patch new file mode 100644 index 0000000..398274a --- /dev/null +++ b/libc-cloexec.patch @@ -0,0 +1,15 @@ +see also +http://serverfault.com/questions/388865/building-python3-on-a-redhat-5-machine + +--- Python-3.2.3/Modules/_posixsubprocess.c~ 2012-04-11 09:54:07.000000000 +0300 ++++ Python-3.2.3/Modules/_posixsubprocess.c 2012-07-26 10:58:29.616131665 +0300 +@@ -37,6 +37,9 @@ + + #define POSIX_CALL(call) if ((call) == -1) goto error + ++#ifndef O_CLOEXEC ++#define O_CLOEXEC 02000000 /* set close_on_exec */ ++#endif + + /* Maximum file descriptor, initialized on module load. */ + static long max_fd; diff --git a/python3.spec b/python3.spec index e6f52d6..117530d 100644 --- a/python3.spec +++ b/python3.spec @@ -46,6 +46,7 @@ Patch2: %{name}-lib64.patch Patch3: %{name}-noarch_to_datadir.patch Patch4: %{name}-no_cmdline_tests.patch Patch5: %{name}-makefile-location.patch +Patch6: libc-cloexec.patch URL: http://www.python.org/ BuildRequires: autoconf >= 2.65 BuildRequires: bluez-libs-devel @@ -447,6 +448,7 @@ Przykłady te są dla Pythona 2.3.4, nie %{version}. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %build if ! grep -q "tmpfs" /proc/self/mounts; then