diff options
author | reed <reed> | 2013-01-09 17:01:02 +0000 |
---|---|---|
committer | reed <reed> | 2013-01-09 17:01:02 +0000 |
commit | 5067e56257aa063b76aeb351fb43542e17103d9d (patch) | |
tree | 71f82f8c5f6c0706b95ea1578b052fe0d312b02b /lang/python32 | |
parent | a77c29d0aaa1e1695a24be6ceb58a37fa7ea9c73 (diff) | |
download | pkgsrc-5067e56257aa063b76aeb351fb43542e17103d9d.tar.gz |
Allow to build on systems without O_CLOEXEC (like CentOS 5.8 Linux).
patch from
http://bugs.python.org/issue14359
http://hg.python.org/cpython/rev/09371e2ae84d
This patch solves building failure so not bumping revision.
Diffstat (limited to 'lang/python32')
-rw-r--r-- | lang/python32/distinfo | 3 | ||||
-rw-r--r-- | lang/python32/patches/patch-modules__posixsubprocess.c | 28 |
2 files changed, 30 insertions, 1 deletions
diff --git a/lang/python32/distinfo b/lang/python32/distinfo index 40d17baab9b..ec4797e7b89 100644 --- a/lang/python32/distinfo +++ b/lang/python32/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.3 2012/05/10 08:38:25 obache Exp $ +$NetBSD: distinfo,v 1.4 2013/01/09 17:01:02 reed Exp $ SHA1 (Python-3.2.3.tar.bz2) = 4c2d562a0681ba27bc920500050e2f08de224311 RMD160 (Python-3.2.3.tar.bz2) = a4d902bc4436ea28df3d706015afd6e0f50131f4 @@ -13,4 +13,5 @@ SHA1 (patch-ao) = 3dca4a62bebcfc6465a527b2e44323b8ef10d399 SHA1 (patch-au) = 6af232b3802c602f19d04049bca6a067724c2c3b SHA1 (patch-av) = 9b44f339f65f029b7f17dbc654739a7ae3c12780 SHA1 (patch-aw) = 598e4710c426110012048946786a6d72f050e0fc +SHA1 (patch-modules__posixsubprocess.c) = 39790dbcfb0d99e7dafa6a175bb65dcfc190168f SHA1 (patch-pyconfig.h.in) = 7ebc0ed9ca9a37c5a6c8e04cc3f7fca4a5c90e8c diff --git a/lang/python32/patches/patch-modules__posixsubprocess.c b/lang/python32/patches/patch-modules__posixsubprocess.c new file mode 100644 index 00000000000..4baa4dbfe1c --- /dev/null +++ b/lang/python32/patches/patch-modules__posixsubprocess.c @@ -0,0 +1,28 @@ +$NetBSD: patch-modules__posixsubprocess.c,v 1.1 2013/01/09 17:01:02 reed Exp $ + +http://bugs.python.org/issue14359 +http://hg.python.org/cpython/rev/09371e2ae84d + +--- Modules/_posixsubprocess.c ++++ Modules/_posixsubprocess.c +@@ -202,7 +202,18 @@ static void + int fd_dir_fd; + if (start_fd >= end_fd) + return; +- fd_dir_fd = open(FD_DIR, O_RDONLY | O_CLOEXEC, 0); ++#ifdef O_CLOEXEC ++ fd_dir_fd = open(FD_DIR, O_RDONLY | O_CLOEXEC, 0); ++#else ++ fd_dir_fd = open(FD_DIR, O_RDONLY, 0); ++#ifdef FD_CLOEXEC ++ { ++ int old = fcntl(fd_dir_fd, F_GETFD); ++ if (old != -1) ++ fcntl(fd_dir_fd, F_SETFD, old | FD_CLOEXEC); ++ } ++#endif ++#endif + if (fd_dir_fd == -1) { + /* No way to get a list of open fds. */ + _close_fds_by_brute_force(start_fd, end_fd, py_fds_to_keep); + |