diff --git a/namespaces/nsenter/nsenter.c b/namespaces/nsenter/nsenter.c index 747fce3a4..8842c443c 100644 --- a/namespaces/nsenter/nsenter.c +++ b/namespaces/nsenter/nsenter.c @@ -2,6 +2,10 @@ // // formated with indent -linux nsenter.c +#define _GNU_SOURCE +#include +#include +#include #include #include #include @@ -18,7 +22,7 @@ #define pr_perror(fmt, ...) fprintf(stderr, "nsenter: " fmt ": %m\n", ##__VA_ARGS__) -static const kBufSize = 256; +static const int kBufSize = 256; static const char *kNsEnter = "nsenter"; void get_args(int *argc, char ***argv) diff --git a/namespaces/nsenter/nsenter.go b/namespaces/nsenter/nsenter.go index 7d21e8e59..5be6c6d5e 100644 --- a/namespaces/nsenter/nsenter.go +++ b/namespaces/nsenter/nsenter.go @@ -3,7 +3,8 @@ package nsenter /* -__attribute__((constructor)) init() { +void nsenter(); +__attribute__((constructor)) int init() { nsenter(); } */