]> git.proxmox.com Git - mirror_lxc.git/commitdiff
build: add src/include to build and simplify header inclusions
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 3 Sep 2021 07:25:56 +0000 (09:25 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 3 Sep 2021 07:25:56 +0000 (09:25 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
40 files changed:
hooks/unmount-namespace.c
src/lxc/Makefile.am
src/lxc/af_unix.c
src/lxc/cgroups/cgfsng.c
src/lxc/cgroups/cgroup2_devices.h
src/lxc/cmd/lxc_user_nic.c
src/lxc/conf.c
src/lxc/confile.c
src/lxc/confile_utils.c
src/lxc/criu.c
src/lxc/initutils.c
src/lxc/log.c
src/lxc/lxccontainer.c
src/lxc/monitor.c
src/lxc/network.c
src/lxc/pam/pam_cgfs.c
src/lxc/rexec.c
src/lxc/start.c
src/lxc/storage/btrfs.c
src/lxc/storage/nbd.c
src/lxc/storage/rbd.c
src/lxc/storage/storage.c
src/lxc/storage/storage.h
src/lxc/storage/storage_utils.c
src/lxc/string_utils.c
src/lxc/string_utils.h
src/lxc/terminal.c
src/lxc/tools/include/getsubopt.c
src/lxc/tools/lxc_copy.c
src/lxc/tools/lxc_device.c
src/lxc/utils.c
src/lxc/utils.h
src/tests/Makefile.am
src/tests/api_reboot.c
src/tests/arch_parse.c
src/tests/attach.c
src/tests/cgpath.c
src/tests/device_add_remove.c
src/tests/get_item.c
src/tests/shortlived.c

index 99b284481b33c5ac55a4b43bdcbfda2a997669fb..c0c8b191cd2edbd7fa20b03de1d0a4f59ed0c903 100644 (file)
@@ -40,7 +40,7 @@
 #include <../src/config.h>
 
 #if IS_BIONIC
-#include <../src/include/lxcmntent.h>
+#include "lxcmntent.h"
 #else
 #include <mntent.h>
 #endif
index d13cbc160a7ee5b4c684988bd0796337a0a40571..3c1f0a3dd3d09f8a0a1bfc3a20498528dfa7db29 100644 (file)
@@ -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
index 92debcf6cdeaadbb94d687b51785b27b10a7c2f7..4f8e2fad6649fde134f54b7c5ee7ddbd548207d5 100644 (file)
@@ -23,7 +23,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 lxc_log_define(af_unix, lxc);
index 1f80802418d00dacabddd3b1a0a77a72d8b13d42..0e9cbcec64bfa99282b4f3e12396f3ec74157ac0 100644 (file)
 #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);
index c8a1606a1415fd160f73f763dc0be27e00a8f30f..31896d292c593f84570a60a07e63722bf64ab4a3 100644 (file)
@@ -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)
index 6ead30b64383f1d3ebcdcd06cc4e318c6105ca13..16ee4651d4ab81ad998a914ea56c0f893043e484 100644 (file)
@@ -43,7 +43,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #define usernic_debug_stream(stream, format, ...)                              \
index 86ad68b52b0a1ce766e0ef71abac67e6a61de211..be9d3072b09987ce2bf96c5548000f7afe49f508 100644 (file)
@@ -75,7 +75,7 @@
 #if HAVE_OPENPTY
 #include <pty.h>
 #else
-#include <../include/openpty.h>
+#include "openpty.h"
 #endif
 
 #if HAVE_LIBCAP
 #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);
index a5f7249b7ddce491c934ce61b073b550a62a0573..9a2fcc3fcd4bcc16f780d4eca27f3d155e43e16c 100644 (file)
@@ -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"
 #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);
index fff20375cf3d04b52d75ebf9d2eb2a59efeac6a5..77627513c979b338403345d38d2f4eb7a8500f85 100644 (file)
@@ -25,7 +25,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 lxc_log_define(confile_utils, lxc);
index 4452d0b0c385029656feb7be9c41aa5eb04df305..9143100fa9f71148fba39d38d44fd38f16e06929 100644 (file)
 #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"
index 5f2a424543a1005fc8dd57c1c5a5f78a8c2b4de8..397e94692c20ae0d6facfd59d7f4aaa61ad2ee50 100644 (file)
@@ -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)
index be3a16fcc1a0ebc5b23a205e703a358e9b05761c..9c5053ec94f3efb8b570e9a8ed04df3649b7b177 100644 (file)
@@ -27,7 +27,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #if HAVE_DLOG
index 3b18d00ff94038fc96f26286d9bdad1631dfe734..9ed50894bdd2a9bac89c9eeff1d2c1e4a5c4e158 100644 (file)
@@ -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"
index 26f1ec04b5bb95effd964f2765497c7a603f0737..1c1d7039a21c7fd5ed93294e28847c131cc5f18c 100644 (file)
@@ -33,7 +33,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 lxc_log_define(monitor, lxc);
index 15ed81bd5e56e2bcf7370ffa16bc7ac796ffab90..32963a0ea3748f70b2f7638ddedd775279a37894 100644 (file)
@@ -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);
index 74d10a760410b7959e30798ed743cc4e2f4447f6..91efe5c80618c7cc94e0721c6fb224bb2b06b7ef 100644 (file)
 #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, ...)                                \
index 060df680e22b8f230014d8aaee6681ffd6653101..2d6345651dc99d59f5871fc738cda867aa6265c5 100644 (file)
@@ -19,7 +19,7 @@
 #include "syscall_wrappers.h"
 
 #if IS_BIONIC
-#include "../include/fexecve.h"
+#include "fexecve.h"
 #endif
 
 #define LXC_MEMFD_REXEC_SEALS \
index 7f0903f1b53469c1b570fc808e9ee1faf936a24d..a96aa27d8dd8bad980ef7d09c9b8c41d995f0f5f 100644 (file)
@@ -63,7 +63,7 @@
 #endif
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 lxc_log_define(start, lxc);
index b115e10bbf8483ffba6f83f61d903e9fa272d68e..22ba1484cefb13c8752977eff1f8f0c067101335 100644 (file)
 #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);
index ba4207380e9b53a22f8506f08a0d80ec228307bb..06515b83343fb5721ad1995b08ceab01ec2a77f3 100644 (file)
@@ -22,7 +22,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 lxc_log_define(nbd, lxc);
index 7a8a8b8be20e4296a37ee0dc0f8ea8321a1d4f9d..f387ac21a6427bbe61eb163ad718e9e60d6d0038 100644 (file)
@@ -18,7 +18,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 lxc_log_define(rbd, lxc);
index a8c4be5f331446eac2067dcc180c508c18cadbd4..e40ecee1fcb7dfab74dcd7222b4015c3cc903286 100644 (file)
@@ -43,7 +43,7 @@
 #include "zfs.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #ifndef BLKGETSIZE64
index 91e08b7fcc94fd70e1548dc360b36e4c6214434f..0f14fd260b7ed7397ebb1a8112b517f6e975517e 100644 (file)
@@ -9,7 +9,7 @@
 #include <lxc/lxccontainer.h>
 
 #if IS_BIONIC
-#include <../include/lxcmntent.h>
+#include "lxcmntent.h"
 #else
 #include <mntent.h>
 #endif
index 2839f0ce7ce53a92f35efdc48e1f5115e415f659..de82e4d4176ff0bb78e41eef6df725819072dfe8 100644 (file)
@@ -31,7 +31,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #ifndef BLKGETSIZE64
index b1d6dc9bc4ae0a1aff56242f42699f24af96c02a..372d660cb2e591c20ac879d8f5b6859834e81000 100644 (file)
 #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)
index ac916c6b683269343796a21d901fc26bb4a5164c..2c1af4a885bf43aa81f192e8f710fd66e8ca35d2 100644 (file)
 #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) */
index 7327893b3e02c3d6ec97edbf02b7e9da2ee9234d..543e947bbb2ca6707b43e9aa9961ab8b132ed6e8 100644 (file)
@@ -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
index c01131a70262eccb3992cf93a2f0ea940d49447d..96d582ac00579dd8012bce94acfd47e9d2d906de 100644 (file)
@@ -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
index a786a300c5bc607c7fc4c0cfb277bbcc93545c2a..94b339f63d4e5b147e6bc2ed35641e7719683910 100644 (file)
@@ -27,7 +27,7 @@
 #include "utils.h"
 
 #ifndef HAVE_GETSUBOPT
-#include "include/getsubopt.h"
+#include "getsubopt.h"
 #endif
 
 lxc_log_define(lxc_copy, lxc);
index c6641f45ac0b93ceeb687f6b49a1bf4fd2368a8b..62d5ac86ea4462be1b4a9c0eb0c0fa37c79bd1f3 100644 (file)
@@ -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"
index 55995405c74f1960cf73f783c679de706aae3151..c2cfecf887dfca3d0e3aa402a651686588a1dc19 100644 (file)
 #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
index 272e2dbef7e274d21f271f7bc9545ac697889bb3..51fb8874b8f92589fe6bd64becd3ee5eac41eb12 100644 (file)
@@ -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
 
index ef8330efd733dba27c27da6ad3151853274222ee..a64d61302db010904389068f15aa4b8311c75cd8 100644 (file)
@@ -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 \
index 91ba9f656bd595280d6a9eceb95a07e26f961c4f..bf051b8b57567987d09a6db24146506ae20a6545 100644 (file)
@@ -32,7 +32,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #define TSTNAME "lxc-api-reboot"
index 47a2518da9908bda3b9896e0df14185ad6979bdb..95792ddd176989503f4cc8714fb92730196f5170 100644 (file)
@@ -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[] = {
index 3e43c7b06e6a8d0c81005e0fc3e0186e647350ad..f4ff5efbb1d6e6c0dd7350af09a636432b892258 100644 (file)
@@ -33,7 +33,7 @@
 #include <lxc/lxccontainer.h>
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #define TSTNAME    "lxc-attach-test"
index b1e5ffc747636ec8c34e8761e5c087a879d5f3f1..81b2162fe845358c85b0e0bbb5d694da58b55a4b 100644 (file)
@@ -36,7 +36,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #define MYNAME "lxctest1"
index dd5c5d3ecce1eb1d22ef3777929d0e4f84744334..a03f7d19ab51e27e7fa8a6e1c816d17818deb3a1 100644 (file)
@@ -25,7 +25,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #define NAME "device_add_remove_test"
index 111fc4af943f44bc5ca0461526414e667359b9ab..5ebe5508d2db9a932db9fa668f5238db101b23b8 100644 (file)
@@ -32,7 +32,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #define MYNAME "lxctest1"
index 5c3d2754829823623513961a79cb7c64dc7d032f..c66e97ede2d306c5b98eb034a4e1eb2609b7c5ca 100644 (file)
@@ -32,7 +32,7 @@
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
-#include "include/strlcpy.h"
+#include "strlcpy.h"
 #endif
 
 #define MYNAME "shortlived"