Skip to content

Commit 3a7b285

Browse files
committed
Fix up configure.ac checks
1 parent 5cd5dba commit 3a7b285

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

cbits/posix/runProcess.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
#include <signal.h>
2020
#endif
2121

22-
#if defined(HAVE_CLOSERANGE)
22+
#if defined(HAVE_CLOSE_RANGE)
2323
#include <linux/close_range.h>
2424
#endif
2525

2626
void
2727
closefrom_excluding(int lowfd, int excludingFd) {
28-
#if defined(HAVE_CLOSERANGE)
28+
#if defined(HAVE_CLOSE_RANGE)
2929
close_range(lowfd, excludingFd - 1);
3030
closefrom(excludingFd + 1);
3131
#else

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ AC_CHECK_HEADERS([signal.h sys/wait.h fcntl.h])
1616
AC_CHECK_FUNCS([setitimer sysconf])
1717
AC_CHECK_FUNCS([execvpe])
1818

19+
# check for headers and functions used by bsd_closefrom.c
20+
AC_CHECK_HEADERS([dirent.h fcntl.h libproc.h ndir.h sys/dir.h sys/ndir.h])
21+
AC_CHECK_FUNCS([
22+
closefrom
23+
close_range
24+
dirfd
25+
proc_pid
26+
proc_pidinfo
27+
sysconf
28+
])
29+
1930
# posix_spawn checks
2031
AC_CHECK_HEADERS([spawn.h])
2132
AC_CHECK_FUNCS([posix_spawnp posix_spawn_file_actions_addchdir],[],[],[

0 commit comments

Comments
 (0)