conf: order includes

parent 0e83121c
...@@ -24,38 +24,37 @@ ...@@ -24,38 +24,37 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include "config.h" #include "config.h"
#include <arpa/inet.h>
#include <dirent.h> #include <dirent.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <grp.h> #include <grp.h>
#include <inttypes.h> #include <inttypes.h>
#include <libgen.h> #include <libgen.h>
#include <linux/loop.h>
#include <net/if.h>
#include <netinet/in.h>
#include <pwd.h> #include <pwd.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <time.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <linux/loop.h>
#include <net/if.h>
#include <netinet/in.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/mount.h> #include <sys/mount.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/prctl.h> #include <sys/prctl.h>
#include <sys/stat.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/sysmacros.h> #include <sys/stat.h>
#include <sys/syscall.h> #include <sys/syscall.h>
#include <sys/sysmacros.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <time.h>
#include <unistd.h>
/* makedev() */
#ifdef MAJOR_IN_MKDEV #ifdef MAJOR_IN_MKDEV
# include <sys/mkdev.h> #include <sys/mkdev.h>
#endif #endif
#ifdef HAVE_STATVFS #ifdef HAVE_STATVFS
...@@ -68,8 +67,26 @@ ...@@ -68,8 +67,26 @@
#include <../include/openpty.h> #include <../include/openpty.h>
#endif #endif
#if HAVE_LIBCAP
#include <sys/capability.h>
#endif
#if HAVE_SYS_PERSONALITY_H
#include <sys/personality.h>
#endif
#if IS_BIONIC
#include <../include/lxcmntent.h>
#else
#include <mntent.h>
#endif
#if !defined(HAVE_PRLIMIT) && defined(HAVE_PRLIMIT64)
#include <../include/prlimit.h>
#endif
#include "af_unix.h" #include "af_unix.h"
#include "caps.h" /* for lxc_caps_last_cap() */ #include "caps.h"
#include "cgroup.h" #include "cgroup.h"
#include "conf.h" #include "conf.h"
#include "confile_utils.h" #include "confile_utils.h"
...@@ -88,29 +105,19 @@ ...@@ -88,29 +105,19 @@
#include "terminal.h" #include "terminal.h"
#include "utils.h" #include "utils.h"
#if HAVE_LIBCAP #ifndef MS_PRIVATE
#include <sys/capability.h> #define MS_PRIVATE (1<<18)
#endif
#if HAVE_SYS_PERSONALITY_H
#include <sys/personality.h>
#endif
#if IS_BIONIC
#include <../include/lxcmntent.h>
#else
#include <mntent.h>
#endif #endif
#if !defined(HAVE_PRLIMIT) && defined(HAVE_PRLIMIT64) #ifndef MS_LAZYTIME
#include <../include/prlimit.h> #define MS_LAZYTIME (1<<25)
#endif #endif
lxc_log_define(lxc_conf, lxc); lxc_log_define(lxc_conf, lxc);
/* Define pivot_root() if missing from the C library */ /* Define pivot_root() if missing from the C library */
#ifndef HAVE_PIVOT_ROOT #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 #ifdef __NR_pivot_root
return syscall(__NR_pivot_root, new_root, put_old); 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) ...@@ -120,15 +127,7 @@ static int pivot_root(const char * new_root, const char * put_old)
#endif #endif
} }
#else #else
extern int pivot_root(const char * new_root, const char * put_old); 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)
#endif #endif
char *lxchook_names[NUM_LXC_HOOKS] = {"pre-start", "pre-mount", "mount", char *lxchook_names[NUM_LXC_HOOKS] = {"pre-start", "pre-mount", "mount",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment