Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
#include "start.h"
#include "storage.h"
#include "storage/overlay.h"
+#include "syscall_wrappers.h"
#include "terminal.h"
#include "utils.h"
struct lxc_conf *current_config;
#endif
-/* Define pivot_root() if missing from the C library */
-#ifndef HAVE_PIVOT_ROOT
-static int pivot_root(const char *new_root, const char *put_old)
-{
-#ifdef __NR_pivot_root
- return syscall(__NR_pivot_root, new_root, put_old);
-#else
- errno = ENOSYS;
- return -1;
-#endif
-}
-#else
-extern int pivot_root(const char *new_root, const char *put_old);
-#endif
-
char *lxchook_names[NUM_LXC_HOOKS] = {
"pre-start",
"pre-mount",
#define keyctl __keyctl
#endif
+#if !HAVE_PIVOT_ROOT
+static int pivot_root(const char *new_root, const char *put_old)
+{
+#ifdef __NR_pivot_root
+ return syscall(__NR_pivot_root, new_root, put_old);
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
+#else
+extern int pivot_root(const char *new_root, const char *put_old);
+#endif
+
#endif /* __LXC_SYSCALL_WRAPPER_H */