diff --git a/configure.ac b/configure.ac index efec743..d7e8a0f 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ AC_TYPE_UINT8_T # Checks for library functions. AC_FUNC_FORK AC_CHECK_FUNCS([dup2 memmove memset mkdir setenv socket strchr strdup strrchr strtoul], [fail=0], [fail=1]) +AC_CHECK_FUNCS([setns]) if test "$fail" = "1" ; then AC_MSG_ERROR(Unable to find necessary functions) diff --git a/src/syscall.h b/src/syscall.h index 4e33729..1ec8ff0 100644 --- a/src/syscall.h +++ b/src/syscall.h @@ -7,7 +7,7 @@ * requires kernel-headers for syscall number hint. */ -#if !defined SYS_setns && defined __NR_setns +#if !defined(HAVE_SETNS) && defined(__NR_setns) static inline int setns(int fd, int nstype) { errno = syscall(__NR_setns, fd, nstype);