From d7cbde80a10c38746663c7420663e15e25a8d227 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Fri, 13 Jun 2014 13:09:13 -0400 Subject: [PATCH] nsenter: fixing the cpp order Docker-DCO-1.1-Signed-off-by: Vincent Batts (github: vbatts) --- namespaces/nsenter.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/namespaces/nsenter.go b/namespaces/nsenter.go index 2be489849..7f4d1c145 100644 --- a/namespaces/nsenter.go +++ b/namespaces/nsenter.go @@ -52,14 +52,16 @@ void get_args(int *argc, char ***argv) { } // Use raw setns syscall for versions of glibc that don't include it (namely glibc-2.12) -#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 14 && defined(SYS_setns) +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 14 #define _GNU_SOURCE #include #include "syscall.h" +#ifdef SYS_setns int setns(int fd, int nstype) { return syscall(SYS_setns, fd, nstype); } #endif +#endif void nsenter() { int argc;