Skip to content

Commit

Permalink
nsenter: fixing the cpp order
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
  • Loading branch information
vbatts committed Jun 13, 2014
1 parent 82a1592 commit d7cbde8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion namespaces/nsenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sched.h>
#include "syscall.h"
#ifdef SYS_setns
int setns(int fd, int nstype) {
return syscall(SYS_setns, fd, nstype);
}
#endif
#endif
void nsenter() {
int argc;
Expand Down

0 comments on commit d7cbde8

Please sign in to comment.