Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit d563b3e

Browse files
committed
Merge pull request #34 from wcwxyz/master
Use configure script to check setns function
2 parents feedb08 + 4b6375a commit d563b3e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ AC_TYPE_UINT8_T
3232
# Checks for library functions.
3333
AC_FUNC_FORK
3434
AC_CHECK_FUNCS([dup2 memmove memset mkdir setenv socket strchr strdup strrchr strtoul], [fail=0], [fail=1])
35+
AC_CHECK_FUNCS([setns])
3536

3637
if test "$fail" = "1" ; then
3738
AC_MSG_ERROR(Unable to find necessary functions)

src/syscall.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* requires kernel-headers for syscall number hint.
88
*/
99

10-
#if !defined SYS_setns && defined __NR_setns
10+
#if !defined(HAVE_SETNS) && defined(__NR_setns)
1111
static inline int setns(int fd, int nstype)
1212
{
1313
errno = syscall(__NR_setns, fd, nstype);

0 commit comments

Comments
 (0)