From 9d257a2a23f3c100c26881ff005e9cb5b9a02839 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sat, 10 Mar 2018 23:40:59 +0100 Subject: [PATCH] conf: order includes Signed-off-by: Christian Brauner --- src/lxc/conf.c | 69 +++++++++++++++++++++++++------------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index cd99124f9..71e6be88f 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -24,38 +24,37 @@ #define _GNU_SOURCE #include "config.h" +#include #include #include #include #include #include #include +#include +#include +#include #include #include #include #include #include -#include -#include -#include -#include -#include -#include #include #include #include #include -#include #include -#include +#include #include +#include #include #include #include +#include +#include -/* makedev() */ #ifdef MAJOR_IN_MKDEV -# include +#include #endif #ifdef HAVE_STATVFS @@ -68,8 +67,26 @@ #include <../include/openpty.h> #endif +#if HAVE_LIBCAP +#include +#endif + +#if HAVE_SYS_PERSONALITY_H +#include +#endif + +#if IS_BIONIC +#include <../include/lxcmntent.h> +#else +#include +#endif + +#if !defined(HAVE_PRLIMIT) && defined(HAVE_PRLIMIT64) +#include <../include/prlimit.h> +#endif + #include "af_unix.h" -#include "caps.h" /* for lxc_caps_last_cap() */ +#include "caps.h" #include "cgroup.h" #include "conf.h" #include "confile_utils.h" @@ -88,29 +105,19 @@ #include "terminal.h" #include "utils.h" -#if HAVE_LIBCAP -#include -#endif - -#if HAVE_SYS_PERSONALITY_H -#include -#endif - -#if IS_BIONIC -#include <../include/lxcmntent.h> -#else -#include +#ifndef MS_PRIVATE +#define MS_PRIVATE (1<<18) #endif -#if !defined(HAVE_PRLIMIT) && defined(HAVE_PRLIMIT64) -#include <../include/prlimit.h> +#ifndef MS_LAZYTIME +#define MS_LAZYTIME (1<<25) #endif lxc_log_define(lxc_conf, lxc); /* 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) +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); @@ -120,15 +127,7 @@ static int pivot_root(const char * new_root, const char * put_old) #endif } #else -extern int pivot_root(const char * new_root, const char * put_old); -#endif - -#ifndef MS_PRIVATE -#define MS_PRIVATE (1<<18) -#endif - -#ifndef MS_LAZYTIME -#define MS_LAZYTIME (1<<25) +extern int pivot_root(const char *new_root, const char *put_old); #endif char *lxchook_names[NUM_LXC_HOOKS] = {"pre-start", "pre-mount", "mount", -- 2.47.2