From: Christian Brauner Date: Sun, 19 Aug 2018 17:32:38 +0000 (+0200) Subject: cmd: move declarations to macro.h X-Git-Tag: lxc-3.1.0~145^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c881c8101b3e405c211fa93cf7905d9989e06800;p=thirdparty%2Flxc.git cmd: move declarations to macro.h Signed-off-by: Christian Brauner --- diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am index 56a45b4ac..75efa0a57 100644 --- a/src/lxc/Makefile.am +++ b/src/lxc/Makefile.am @@ -330,6 +330,7 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \ conf.c conf.h \ list.h \ log.c log.h \ + macro.h \ namespace.c namespace.h \ utils.c utils.h endif diff --git a/src/lxc/cmd/lxc_usernsexec.c b/src/lxc/cmd/lxc_usernsexec.c index 837ed3428..35c00c8d3 100644 --- a/src/lxc/cmd/lxc_usernsexec.c +++ b/src/lxc/cmd/lxc_usernsexec.c @@ -44,21 +44,12 @@ #include "conf.h" #include "list.h" #include "log.h" +#include "macro.h" #include "namespace.h" #include "utils.h" -#ifndef MS_REC -#define MS_REC 16384 -#endif - -#ifndef MS_SLAVE -#define MS_SLAVE (1 << 19) -#endif - extern int lxc_log_fd; -int unshare(int flags); - static void usage(const char *name) { printf("usage: %s [-h] [-m ] -- [command [arg ..]]\n", name); diff --git a/src/lxc/macro.h b/src/lxc/macro.h index 75c63c7c1..8eb54f163 100644 --- a/src/lxc/macro.h +++ b/src/lxc/macro.h @@ -187,4 +187,13 @@ extern int __build_bug_on_failed; #define NLMSG_ERROR 0x2 #endif +/* mount */ +#ifndef MS_REC +#define MS_REC 16384 +#endif + +#ifndef MS_SLAVE +#define MS_SLAVE (1 << 19) +#endif + #endif /* __LXC_MACRO_H */