mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-06-02 12:57:56 +00:00
build: add src/include to build and simplify header inclusions
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
074c356087
commit
58db1a61c8
@ -40,7 +40,7 @@
|
||||
#include <../src/config.h>
|
||||
|
||||
#if IS_BIONIC
|
||||
#include <../src/include/lxcmntent.h>
|
||||
#include "lxcmntent.h"
|
||||
#else
|
||||
#include <mntent.h>
|
||||
#endif
|
||||
|
@ -230,6 +230,7 @@ AM_CFLAGS += -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
|
||||
-DSBINDIR=\"$(SBINDIR)\" \
|
||||
-DAPPARMOR_CACHE_DIR=\"$(APPARMOR_CACHE_DIR)\" \
|
||||
-I $(top_srcdir)/src \
|
||||
-I $(top_srcdir)/src/include \
|
||||
-I $(top_srcdir)/src/lxc \
|
||||
-I $(top_srcdir)/src/lxc/storage \
|
||||
-I $(top_srcdir)/src/lxc/cgroups
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(af_unix, lxc);
|
||||
|
@ -54,11 +54,11 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
#include "include/strlcat.h"
|
||||
#include "strlcat.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(cgfsng, cgroup);
|
||||
|
@ -24,8 +24,8 @@
|
||||
#include "memory_utils.h"
|
||||
#include "syscall_numbers.h"
|
||||
|
||||
#include "include/bpf.h"
|
||||
#include "include/bpf_common.h"
|
||||
#include "bpf.h"
|
||||
#include "bpf_common.h"
|
||||
|
||||
#ifndef HAVE_BPF
|
||||
static inline int bpf_lxc(int cmd, union bpf_attr *attr, size_t size)
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#define usernic_debug_stream(stream, format, ...) \
|
||||
|
@ -75,7 +75,7 @@
|
||||
#if HAVE_OPENPTY
|
||||
#include <pty.h>
|
||||
#else
|
||||
#include <../include/openpty.h>
|
||||
#include "openpty.h"
|
||||
#endif
|
||||
|
||||
#if HAVE_LIBCAP
|
||||
@ -83,25 +83,25 @@
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
#include "include/strlcat.h"
|
||||
#include "strlcat.h"
|
||||
#endif
|
||||
|
||||
#if IS_BIONIC
|
||||
#include <../include/lxcmntent.h>
|
||||
#include "lxcmntent.h"
|
||||
#else
|
||||
#include <mntent.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_PRLIMIT) && defined(HAVE_PRLIMIT64)
|
||||
#include <../include/prlimit.h>
|
||||
#include "prlimit.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCHRNUL
|
||||
#include "include/strchrnul.h"
|
||||
#include "strchrnul.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(conf, lxc);
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "config.h"
|
||||
#include "confile.h"
|
||||
#include "confile_utils.h"
|
||||
#include "../include/netns_ifaddrs.h"
|
||||
#include "netns_ifaddrs.h"
|
||||
#include "log.h"
|
||||
#include "lxcseccomp.h"
|
||||
#include "macro.h"
|
||||
@ -40,11 +40,11 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
#include "include/strlcat.h"
|
||||
#include "strlcat.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(confile, lxc);
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(confile_utils, lxc);
|
||||
|
@ -29,13 +29,13 @@
|
||||
#include "utils.h"
|
||||
|
||||
#if IS_BIONIC
|
||||
#include <../include/lxcmntent.h>
|
||||
#include "lxcmntent.h"
|
||||
#else
|
||||
#include <mntent.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#define CRIU_VERSION "2.0"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "process_utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
static char *copy_global_config_value(char *p)
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#if HAVE_DLOG
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../include/netns_ifaddrs.h"
|
||||
#include "netns_ifaddrs.h"
|
||||
#include "af_unix.h"
|
||||
#include "api_extensions.h"
|
||||
#include "attach.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(monitor, lxc);
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "../include/netns_ifaddrs.h"
|
||||
#include "netns_ifaddrs.h"
|
||||
#include "af_unix.h"
|
||||
#include "conf.h"
|
||||
#include "config.h"
|
||||
@ -42,7 +42,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(network, lxc);
|
||||
|
@ -34,11 +34,11 @@
|
||||
#include <security/pam_modules.h>
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
#include "include/strlcat.h"
|
||||
#include "strlcat.h"
|
||||
#endif
|
||||
|
||||
#define pam_cgfs_debug_stream(stream, format, ...) \
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "syscall_wrappers.h"
|
||||
|
||||
#if IS_BIONIC
|
||||
#include "../include/fexecve.h"
|
||||
#include "fexecve.h"
|
||||
#endif
|
||||
|
||||
#define LXC_MEMFD_REXEC_SEALS \
|
||||
|
@ -63,7 +63,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(start, lxc);
|
||||
|
@ -26,11 +26,11 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
#include "include/strlcat.h"
|
||||
#include "strlcat.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(btrfs, lxc);
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(nbd, lxc);
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(rbd, lxc);
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "zfs.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef BLKGETSIZE64
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <lxc/lxccontainer.h>
|
||||
|
||||
#if IS_BIONIC
|
||||
#include <../include/lxcmntent.h>
|
||||
#include "lxcmntent.h"
|
||||
#else
|
||||
#include <mntent.h>
|
||||
#endif
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef BLKGETSIZE64
|
||||
|
@ -35,11 +35,11 @@
|
||||
#include "string_utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
#include "include/strlcat.h"
|
||||
#include "strlcat.h"
|
||||
#endif
|
||||
|
||||
char **lxc_va_arg_list_to_argv(va_list ap, size_t skip, int do_strdup)
|
||||
|
@ -11,15 +11,15 @@
|
||||
#include "macro.h"
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
#include "include/strlcat.h"
|
||||
#include "strlcat.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRCHRNUL
|
||||
#include "include/strchrnul.h"
|
||||
#include "strchrnul.h"
|
||||
#endif
|
||||
|
||||
/* convert variadic argument lists to arrays (for execl type argument lists) */
|
||||
|
@ -32,7 +32,7 @@
|
||||
#if HAVE_OPENPTY
|
||||
#include <pty.h>
|
||||
#else
|
||||
#include <../include/openpty.h>
|
||||
#include "openpty.h"
|
||||
#endif
|
||||
|
||||
#define LXC_TERMINAL_BUFFER_SIZE 1024
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#ifndef HAVE_STRCHRNUL
|
||||
#include "../../../include/strchrnul.h"
|
||||
#include "strchrnul.h"
|
||||
#endif
|
||||
|
||||
/* Parse comma separated suboption from *OPTIONP and match against
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_GETSUBOPT
|
||||
#include "include/getsubopt.h"
|
||||
#include "getsubopt.h"
|
||||
#endif
|
||||
|
||||
lxc_log_define(lxc_copy, lxc);
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include <lxc/lxccontainer.h>
|
||||
|
||||
#include "../../include/netns_ifaddrs.h"
|
||||
#include "netns_ifaddrs.h"
|
||||
#include "arguments.h"
|
||||
#include "config.h"
|
||||
#include "log.h"
|
||||
|
@ -40,11 +40,11 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRLCAT
|
||||
#include "include/strlcat.h"
|
||||
#include "strlcat.h"
|
||||
#endif
|
||||
|
||||
#ifndef O_PATH
|
||||
|
@ -35,7 +35,7 @@ __hidden extern char *get_rundir(void);
|
||||
/* Define getline() if missing from the C library */
|
||||
#ifndef HAVE_GETLINE
|
||||
#ifdef HAVE_FGETLN
|
||||
#include <../include/getline.h>
|
||||
#include "getline.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -1288,6 +1288,7 @@ AM_CFLAGS += -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
|
||||
-DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
|
||||
-DSBINDIR=\"$(SBINDIR)\" \
|
||||
-I $(top_srcdir)/src \
|
||||
-I $(top_srcdir)/src/include \
|
||||
-I $(top_srcdir)/src/lxc \
|
||||
-I $(top_srcdir)/src/lxc/cgroups \
|
||||
-I $(top_srcdir)/src/lxc/tools \
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#define TSTNAME "lxc-api-reboot"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "../lxc/memory_utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
static const char *const arches[] = {
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <lxc/lxccontainer.h>
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#define TSTNAME "lxc-attach-test"
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#define MYNAME "lxctest1"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#define NAME "device_add_remove_test"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#define MYNAME "lxctest1"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifndef HAVE_STRLCPY
|
||||
#include "include/strlcpy.h"
|
||||
#include "strlcpy.h"
|
||||
#endif
|
||||
|
||||
#define MYNAME "shortlived"
|
||||
|
Loading…
Reference in New Issue
Block a user