summaryrefslogtreecommitdiffstats
path: root/Modules/_posixsubprocess.c
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-01-21 23:20:37 (GMT)
committerGregory P. Smith <greg@krypto.org>2012-01-21 23:20:37 (GMT)
commitd45382db0b1fd6ad89cc43cd87c181f2289a403e (patch)
treec4eb3a27ff7c62faa0e64c7c41f5d4f9c60c1493 /Modules/_posixsubprocess.c
parent61f0da8c02edad35634b46cf733d050a6082ebad (diff)
parente9b7cab1da131f26e0a04900718a39da962b82e1 (diff)
downloadcpython-d45382db0b1fd6ad89cc43cd87c181f2289a403e.zip
cpython-d45382db0b1fd6ad89cc43cd87c181f2289a403e.tar.gz
cpython-d45382db0b1fd6ad89cc43cd87c181f2289a403e.tar.bz2
bugfix for *BSD platforms. (oops messed up #define)
Diffstat (limited to 'Modules/_posixsubprocess.c')
-rw-r--r--Modules/_posixsubprocess.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c
index 8f8cf8e..7407a11 100644
--- a/Modules/_posixsubprocess.c
+++ b/Modules/_posixsubprocess.c
@@ -21,10 +21,8 @@
# define dirent dirent64
# if !defined(HAVE_DIRFD)
/* Some versions of Solaris lack dirfd(). */
-# define DIRFD(dirp) ((dirp)->dd_fd)
+# define dirfd(dirp) ((dirp)->dd_fd)
# define HAVE_DIRFD
-# else
-# define DIRFD(dirp) (dirfd(dirp))
# endif
#endif
@@ -250,7 +248,7 @@ static void _close_open_fd_range_maybe_unsafe(int start_fd, int end_fd,
} else {
struct dirent *dir_entry;
#ifdef HAVE_DIRFD
- int fd_used_by_opendir = DIRFD(proc_fd_dir);
+ int fd_used_by_opendir = dirfd(proc_fd_dir);
#else
int fd_used_by_opendir = start_fd - 1;
#endif