[packages/python3/AC-branch: 1/2] define O_CLOEXEC on old libc
glen
glen at pld-linux.org
Thu Jul 26 10:38:12 CEST 2012
commit 2a419ad650520f6fcfc8841f3330f413e3fe21c9
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Jul 26 11:36:34 2012 +0300
define O_CLOEXEC on old libc
libc-cloexec.patch | 15 +++++++++++++++
python3.spec | 2 ++
2 files changed, 17 insertions(+)
---
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
More information about the pld-cvs-commit
mailing list