#endif
/* Define setns() if missing from the C library */
-#ifndef HAVE_SETNS
+#if !HAVE_SETNS
static inline int setns(int fd, int nstype)
{
#ifdef __NR_setns
#include <unistd.h>'''],
['close_range', '''#include <unistd.h>'''],
['execveat', '''#include <unistd.h>'''],
+ ['endmntent', '''#include <stdio.h>
+ #include <mntent.h>'''],
['faccessat', '''#include <fcntl.h>
#include <unistd.h>'''],
['fexecve', '''#include <unistd.h>'''],
+ ['fgetln', '''#include <stdio.h>'''],
['fsconfig', '''#include <sys/mount.h>'''],
['fsmount', '''#include <sys/mount.h>'''],
['fsopen', '''#include <sys/mount.h>'''],
['fspick', '''#include <sys/mount.h>'''],
+ ['getgrgid_r', '''#include <sys/types.h>
+ #include <grp.h>'''],
+ ['getline', '''#include <stdio.h>'''],
+ ['getsubopt', '''#include <stdlib.h>'''],
['gettid', '''#include <sys/types.h>
#include <unistd.h>'''],
+ ['hasmntopt', '''#include <stdio.h>
+ #include <mntent.h>'''],
['kcmp', '''#include <linux/kcmp.h>'''],
['keyctl', '''#include <sys/types.h>
#include <keyutils.h>'''],
['renameat2', '''#include <stdio.h>
#include <fcntl.h>'''],
['sethostname', '''#include <unistd.h>'''],
+ ['setmntent', '''#include <stdio.h>
+ #include <mntent.h>'''],
['setns', '''#include <sched.h>'''],
['signalfd', '''#include <sys/signalfd.h>'''],
['statx', '''#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>'''],
+ ['strchrnul', '''#include <string.h>'''],
['strlcat', '''#include <string.h>'''],
['strlcpy', '''#include <string.h>'''],
['unshare', '''#include <sched.h>'''],
]
- if cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
- conf.set10('HAVE_' + ident[0].to_upper(), true)
- endif
+ have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
+ conf.set10('HAVE_' + ident[0].to_upper(), have)
endforeach
sh = find_program('sh')
conf.set10('HAVE_STATIC_LIBCAP', libcap_static.found())
endif
+have = cc.has_function('strchrnul', prefix : '#include <string.h>', args : '-D_GNU_SOURCE')
+conf.set10('HAVE_STRCHRNUL', have)
+
+have = cc.has_function('openpty', prefix : '#include <pty.h>', args : '-D_GNU_SOURCE')
+conf.set10('HAVE_OPENPTY', have)
+
+config_h = configure_file(
+ output : 'config.h',
+ configuration : conf)
+
+add_project_arguments('-include', 'config.h', language : 'c')
+
basic_includes = include_directories(
+ '.',
'src',
- 'src/include',
- '.')
+ 'src/include')
liblxc_includes = [basic_includes, include_directories(
'src/lxc/cgroups',
'src/lxc/lsm',
'src/lxc/storage')]
-add_project_arguments('-include', 'config.h', language : 'c')
-
-subdir('hooks')
subdir('src/include')
+subdir('src/lxc/tools/include')
+subdir('hooks')
subdir('src/lxc')
-subdir('src/lxc/cmd')
-subdir('src/lxc/tools')
-
-config_h = configure_file(
- output : 'config.h',
- configuration : conf)
liblxc = shared_library(
'lxc',
version : liblxc_version,
- include_directories : tools_liblxc_includes,
+ include_directories: liblxc_includes,
link_args : ['-DPIC'],
c_args : ['-DPIC'],
link_whole : [liblxc_static],
libselinux,
libapparmor])
-public_programs = []
-
-public_programs += executable(
- 'lxc-autostart',
- tools_lxc_autostart_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-cgroup',
- tools_lxc_cgroup_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-checkpoint',
- tools_lxc_checkpoint_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-config',
- tools_lxc_config_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-console',
- tools_lxc_console_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-copy',
- tools_lxc_copy_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-create',
- tools_lxc_create_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-destroy',
- tools_lxc_destroy_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-device',
- tools_lxc_device_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-execute',
- tools_lxc_execute_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-freeze',
- tools_lxc_freeze_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-info',
- tools_lxc_info_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-ls',
- tools_lxc_ls_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-monitor',
- tools_lxc_monitor_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-snapshot',
- tools_lxc_snapshot_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-start',
- tools_lxc_start_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-stop',
- tools_lxc_stop_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-top',
- tools_lxc_top_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-unfreeze',
- tools_lxc_unfreeze_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-unshare',
- tools_lxc_unshare_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
-public_programs += executable(
- 'lxc-wait',
- tools_lxc_wait_sources,
- include_directories : tools_liblxc_includes,
- dependencies : liblxc_dep,
- install : true)
-
cmd_programs = []
+subdir('src/lxc/cmd')
+
+public_programs = []
+subdir('src/lxc/tools')
cmd_programs += executable(
'lxc-init',
foreach tuple : [
['bpf'],
['close_range'],
+ ['endmntent'],
['execveat'],
['faccessat'],
- ['fexecve'],
+ ['strchrnul'],
+ ['fgetln'],
['fsconfig'],
['fsmount'],
['fsopen'],
['fspick'],
+ ['getgrgid_r'],
+ ['getline'],
+ ['getsubopt'],
['gettid'],
+ ['hasmntopt'],
['kcmp'],
['keyctl'],
['memfd_create'],
['prlimit64'],
['renameat2'],
['sethostname'],
+ ['setmntent'],
['setns'],
['signalfd'],
['statx'],
'netns_ifaddrs.c',
'netns_ifaddrs.h')
-if cc.has_function('getline', prefix : '#include <stdio.h>', args : '-D_GNU_SOURCE')
- conf.set10('HAVE_GETLINE', true)
-else
+if conf.get('HAVE_GETLINE') == 0
include_sources += files(
'getline.c',
'getline.h')
endif
-if cc.has_function('fexecve', prefix : '#include <unistd.h>', args : '-D_GNU_SOURCE')
- conf.set10('HAVE_FEXECVE', true)
-else
+if conf.get('HAVE_FEXECVE') == 0
include_sources += files(
'fexecve.c',
'fexecve.h')
endif
-getgr_headers = '''
-#include <sys/types.h>
-#include <grp.h>
-'''
-
-if cc.has_function('getgrgid_r', prefix : getgr_headers, args : '-D_GNU_SOURCE')
- conf.set10('HAVE_GETGRGID_R', true)
-else
+if conf.get('HAVE_GETGRGID_R') == 0
include_sources += files(
'getgrgid_r.c',
'getgrgid_r.h')
endif
-mntent_headers = '''
-#include <stdio.h>
-#include <mntent.h>
-'''
-
-have_hasmntopt = cc.has_function('hasmntopt', prefix : mntent_headers, args : '-D_GNU_SOURCE')
-if have_hasmntopt
- conf.set10('HAVE_HASMNTOPT', true)
-endif
-
-have_setmntent = cc.has_function('setmntent', prefix : mntent_headers, args : '-D_GNU_SOURCE')
-if have_setmntent
- conf.set10('HAVE_SETMNTENT', true)
-endif
-
-have_endmntent = cc.has_function('endmntent', prefix : mntent_headers, args : '-D_GNU_SOURCE')
-if have_endmntent
- conf.set10('HAVE_ENDMNTENT', true)
-endif
-
-if have_hasmntopt == false or have_setmntent == false or have_endmntent == false
+if conf.get('HAVE_HASMNTOPT') == 0 or conf.get('HAVE_SETMNTENT') == 0 or conf.get('HAVE_ENDMNTENT') == 0
include_sources += files(
'lxcmntent.c',
'lxcmntent.h')
endif
-if cc.has_function('strlcpy', prefix : '#include <string.h>', args : '-D_GNU_SOURCE')
- conf.set10('HAVE_STRLCPY', true)
-else
+if conf.get('HAVE_STRLCPY') == 0
include_sources += files(
'strlcpy.c',
'strlcpy.h')
endif
-if cc.has_function('strlcat', prefix : '#include <string.h>', args : '-D_GNU_SOURCE')
- conf.set10('HAVE_STRLCAT', true)
-else
+if conf.get('HAVE_STRLCAT') == 0
include_sources += files(
'strlcat.c',
'strlcat.h')
endif
-if cc.has_function('strchrnul', prefix : '#include <string.h>', args : '-D_GNU_SOURCE')
- conf.set10('HAVE_STRCHRNUL', true)
-else
+if conf.get('HAVE_STRCHRNUL') == 0
include_sources += files(
'strchrnul.c',
'strchrnul.h')
endif
-if cc.has_function('openpty', prefix : '#include <pty.h>', args : '-D_GNU_SOURCE')
- conf.set10('HAVE_OPENPTY', true)
-else
+if conf.get('HAVE_OPENPTY') == 0
include_sources += files(
'openpty.c',
'openpty.h')
#include <stdint.h>
#include <string.h>
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
#include "process_utils.h"
#include "utils.h"
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
#include "syscall_wrappers.h"
#include "utils.h"
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
-#ifndef HAVE_STRLCAT
+#if !HAVE_STRLCAT
#include "strlcat.h"
#endif
#include "bpf.h"
#include "bpf_common.h"
-#ifndef HAVE_BPF
+#if !HAVE_BPF
static inline int bpf_lxc(int cmd, union bpf_attr *attr, size_t size)
{
return syscall(__NR_bpf, cmd, attr, size);
#include <sys/capability.h>
#endif
-#ifndef HAVE_STRLCAT
+#if !HAVE_STRLCAT
#include "strlcat.h"
#endif
#include "prlimit.h"
#endif
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
-#ifndef HAVE_STRCHRNUL
+#if !HAVE_STRCHRNUL
#include "strchrnul.h"
#endif
#include "parse.h"
#include "utils.h"
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
-#ifndef HAVE_STRLCAT
+#if !HAVE_STRLCAT
#include "strlcat.h"
#endif
#include "parse.h"
#include "utils.h"
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
#include <mntent.h>
#endif
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
#include "memory_utils.h"
#include "utils.h"
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
#include <mntent.h>
#endif
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "include/strlcpy.h"
#endif
#define hweight32(w) __const_hweight32(w)
#define hweight64(w) __const_hweight64(w)
-#ifndef HAVE___ALIGNED_U64
+#if !HAVE___ALIGNED_U64
#define __aligned_u64 __u64 __attribute__((aligned(8)))
#endif
#define BITS_PER_TYPE(type) (sizeof(type) * 8)
#define LAST_BIT_PER_TYPE(type) (BITS_PER_TYPE(type) - 1)
-#ifndef HAVE_SYS_PERSONALITY_H
+#if !HAVE_SYS_PERSONALITY_H
#define PER_LINUX 0x0000
#define PER_LINUX32 0x0008
#endif
__hidden extern pid_t lxc_raw_clone_cb(int (*fn)(void *), void *args, unsigned long flags,
int *pidfd);
-#ifndef HAVE_EXECVEAT
+#if !HAVE_EXECVEAT
static inline int execveat(int dirfd, const char *pathname, char *const argv[],
char *const envp[], int flags)
{
#include <sys/capability.h>
#endif
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
#include "macro.h"
#include "memory_utils.h"
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
-#ifndef HAVE_STRLCAT
+#if !HAVE_STRLCAT
#include "strlcat.h"
#endif
#include "initutils.h"
#include "macro.h"
-#ifndef HAVE_STRLCAT
+#if !HAVE_STRLCAT
#include "strlcat.h"
#endif
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
-#ifndef HAVE_STRCHRNUL
+#if !HAVE_STRCHRNUL
#include "strchrnul.h"
#endif
#define F_SEAL_WRITE 0x0008
#endif
-#ifndef HAVE_MEMFD_CREATE
+#if !HAVE_MEMFD_CREATE
static inline int memfd_create_lxc(const char *name, unsigned int flags)
{
return syscall(__NR_memfd_create, name, flags);
extern int memfd_create(const char *name, unsigned int flags);
#endif
-#ifndef HAVE_PIVOT_ROOT
+#if !HAVE_PIVOT_ROOT
static inline int pivot_root(const char *new_root, const char *put_old)
{
return syscall(__NR_pivot_root, new_root, put_old);
#endif
/* Define sethostname() if missing from the C library */
-#ifndef HAVE_SETHOSTNAME
+#if !HAVE_SETHOSTNAME
static inline int sethostname(const char *name, size_t len)
{
return syscall(__NR_sethostname, name, len);
#endif
/* Define setns() if missing from the C library */
-#ifndef HAVE_SETNS
+#if !HAVE_SETNS
static inline int setns(int fd, int nstype)
{
return syscall(__NR_setns, fd, nstype);
}
#endif
-#ifndef HAVE_SYS_SIGNALFD_H
+#if !HAVE_SYS_SIGNALFD_H
struct signalfd_siginfo {
uint32_t ssi_signo;
int32_t ssi_errno;
#endif
/* Define unshare() if missing from the C library */
-#ifndef HAVE_UNSHARE
+#if !HAVE_UNSHARE
static inline int unshare(int flags)
{
return syscall(__NR_unshare, flags);
#endif
/* Define faccessat() if missing from the C library */
-#ifndef HAVE_FACCESSAT
+#if !HAVE_FACCESSAT
static int faccessat(int __fd, const char *__file, int __type, int __flag)
{
return syscall(__NR_faccessat, __fd, __file, __type, __flag);
}
#endif
-#ifndef HAVE_MOVE_MOUNT
+#if !HAVE_MOVE_MOUNT
static inline int move_mount_lxc(int from_dfd, const char *from_pathname,
int to_dfd, const char *to_pathname,
unsigned int flags)
const char *to_pathname, unsigned int flags);
#endif
-#ifndef HAVE_OPEN_TREE
+#if !HAVE_OPEN_TREE
static inline int open_tree_lxc(int dfd, const char *filename, unsigned int flags)
{
return syscall(__NR_open_tree, dfd, filename, flags);
extern int open_tree(int dfd, const char *filename, unsigned int flags);
#endif
-#ifndef HAVE_FSOPEN
+#if !HAVE_FSOPEN
static inline int fsopen_lxc(const char *fs_name, unsigned int flags)
{
return syscall(__NR_fsopen, fs_name, flags);
extern int fsopen(const char *fs_name, unsigned int flags);
#endif
-#ifndef HAVE_FSPICK
+#if !HAVE_FSPICK
static inline int fspick_lxc(int dfd, const char *path, unsigned int flags)
{
return syscall(__NR_fspick, dfd, path, flags);
extern int fspick(int dfd, const char *path, unsigned int flags);
#endif
-#ifndef HAVE_FSCONFIG
+#if !HAVE_FSCONFIG
static inline int fsconfig_lxc(int fd, unsigned int cmd, const char *key, const void *value, int aux)
{
return syscall(__NR_fsconfig, fd, cmd, key, value, aux);
extern int fsconfig(int fd, unsigned int cmd, const char *key, const void *value, int aux);
#endif
-#ifndef HAVE_FSMOUNT
+#if !HAVE_FSMOUNT
static inline int fsmount_lxc(int fs_fd, unsigned int flags, unsigned int attr_flags)
{
return syscall(__NR_fsmount, fs_fd, flags, attr_flags);
__u64 userns_fd;
};
-#ifndef HAVE_MOUNT_SETATTR
+#if !HAVE_MOUNT_SETATTR
static inline int mount_setattr(int dfd, const char *path, unsigned int flags,
struct lxc_mount_attr *attr, size_t size)
{
#define PROTECT_OPEN_W (PROTECT_OPEN_W_WITH_TRAILING_SYMLINKS | O_NOFOLLOW)
#define PROTECT_OPEN_RW (O_CLOEXEC | O_NOCTTY | O_RDWR | O_NOFOLLOW)
-#ifndef HAVE_OPENAT2
+#if !HAVE_OPENAT2
static inline int openat2(int dfd, const char *filename, struct lxc_open_how *how, size_t size)
{
return syscall(__NR_openat2, dfd, filename, how, size);
#define CLOSE_RANGE_CLOEXEC (1U << 2)
#endif
-#ifndef HAVE_CLOSE_RANGE
+#if !HAVE_CLOSE_RANGE
static inline int close_range(unsigned int fd, unsigned int max_fd, unsigned int flags)
{
return syscall(__NR_close_range, fd, max_fd, flags);
}
#endif
-#ifndef HAVE_SYS_PERSONALITY_H
+#if !HAVE_SYS_PERSONALITY_H
static inline int personality(unsigned long persona)
{
return syscall(__NR_personality, persona);
--- /dev/null
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+if conf.get('HAVE_GETSUBOPT') == 0
+ include_sources += files(
+ 'getsubopt.c',
+ 'getsubopt.h')
+endif
'../cgroups',
'../lsm',
'../storage',
- '../../include')
+ '../../include',
+ '../../../')
tools_common_sources = files(
'arguments.c',
tools_lxc_console_sources = files(
'lxc_console.c') + tools_common_sources
-if cc.has_function('getsubopt', prefix : '#include <stdlib.h>', args : '-D_GNU_SOURCE')
- conf.set10('HAVE_GETSUBOPT', true)
-else
- include_sources += files(
- 'tools/include/getsubopt.c',
- 'tools/include/getsubopt.h')
-endif
-
tools_lxc_copy_sources = files(
'lxc_copy.c') + tools_common_sources
tools_lxc_wait_sources = files(
'lxc_wait.c') + tools_common_sources
+
+public_programs += executable(
+ 'lxc-autostart',
+ tools_lxc_autostart_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-cgroup',
+ tools_lxc_cgroup_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-checkpoint',
+ tools_lxc_checkpoint_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-config',
+ tools_lxc_config_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-console',
+ tools_lxc_console_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-copy',
+ tools_lxc_copy_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-create',
+ tools_lxc_create_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-destroy',
+ tools_lxc_destroy_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-device',
+ tools_lxc_device_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-execute',
+ tools_lxc_execute_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-freeze',
+ tools_lxc_freeze_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-info',
+ tools_lxc_info_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-ls',
+ tools_lxc_ls_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-monitor',
+ tools_lxc_monitor_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-snapshot',
+ tools_lxc_snapshot_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-start',
+ tools_lxc_start_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-stop',
+ tools_lxc_stop_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-top',
+ tools_lxc_top_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-unfreeze',
+ tools_lxc_unfreeze_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-unshare',
+ tools_lxc_unshare_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
+
+public_programs += executable(
+ 'lxc-wait',
+ tools_lxc_wait_sources,
+ include_directories : tools_liblxc_includes,
+ dependencies : liblxc_dep,
+ install : true)
#include "syscall_wrappers.h"
#include "utils.h"
-#ifndef HAVE_STRLCPY
+#if !HAVE_STRLCPY
#include "strlcpy.h"
#endif
-#ifndef HAVE_STRLCAT
+#if !HAVE_STRLCAT
#include "strlcat.h"
#endif
__hidden extern char *get_rundir(void);
/* Define getline() if missing from the C library */
-#ifndef HAVE_GETLINE
-#ifdef HAVE_FGETLN
+#if !HAVE_GETLINE
+#if !HAVE_FGETLN
#include "getline.h"
#endif
#endif