Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9b7cab

Browse files
committed
Another issue #8052 bugfix (related to previous commit).
"oops" while rearranging the #defines.
1 parent e3f7848 commit e9b7cab

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Modules/_posixsubprocess.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
# define dirent dirent64
2222
# if !defined(HAVE_DIRFD)
2323
/* Some versions of Solaris lack dirfd(). */
24-
# define DIRFD(dirp) ((dirp)->dd_fd)
24+
# define dirfd(dirp) ((dirp)->dd_fd)
2525
# define HAVE_DIRFD
26-
# else
27-
# define DIRFD(dirp) (dirfd(dirp))
2826
# endif
2927
#endif
3028

@@ -248,7 +246,7 @@ static void _close_open_fd_range_maybe_unsafe(int start_fd, int end_fd,
248246
} else {
249247
struct dirent *dir_entry;
250248
#ifdef HAVE_DIRFD
251-
int fd_used_by_opendir = DIRFD(proc_fd_dir);
249+
int fd_used_by_opendir = dirfd(proc_fd_dir);
252250
#else
253251
int fd_used_by_opendir = start_fd - 1;
254252
#endif

0 commit comments

Comments
 (0)