Merge pull request #3962 from brauner/2021-09-02.fixes

tree-wide: build fixes
This commit is contained in:
Stéphane Graber 2021-09-02 13:57:28 -04:00 committed by GitHub
commit 074c356087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 1190 additions and 23 deletions

View File

@ -21,7 +21,9 @@
#ifndef _LXC_FEXECVE_H
#define _LXC_FEXECVE_H
#include "../lxc/compiler.h"
#include <stdio.h>
extern int fexecve(int fd, char *const argv[], char *const envp[]);
__hidden extern int fexecve(int fd, char *const argv[], char *const envp[]);
#endif /* _LXC_FEXECVE_H */

View File

@ -26,7 +26,9 @@
#include <sys/types.h>
#include <grp.h>
extern int getgrgid_r(gid_t gid, struct group *gr, char *buf, size_t size,
#include "../lxc/compiler.h"
__hidden extern int getgrgid_r(gid_t gid, struct group *gr, char *buf, size_t size,
struct group **res);
#endif /* _GETGRGID_R_H */

View File

@ -32,6 +32,8 @@
#include <stdio.h>
extern ssize_t getline(char **outbuf, size_t *outsize, FILE *fp);
#include "../lxc/compiler.h"
__hidden extern ssize_t getline(char **outbuf, size_t *outsize, FILE *fp);
#endif

View File

@ -21,6 +21,8 @@
#ifndef _LXCMNTENT_H
#define _LXCMNTENT_H
#include "../lxc/compiler.h"
#if IS_BIONIC
struct mntent
{
@ -32,20 +34,21 @@ struct mntent
int mnt_passno;
};
extern struct mntent *getmntent (FILE *stream);
extern struct mntent *getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz);
__hidden extern struct mntent *getmntent(FILE *stream);
__hidden extern struct mntent *getmntent_r(FILE *stream, struct mntent *mp,
char *buffer, int bufsiz);
#endif
#if !defined(HAVE_SETMNTENT) || IS_BIONIC
FILE *setmntent (const char *file, const char *mode);
__hidden FILE *setmntent(const char *file, const char *mode);
#endif
#if !defined(HAVE_ENDMNTENT) || IS_BIONIC
int endmntent (FILE *stream);
__hidden int endmntent(FILE *stream);
#endif
#if !defined(HAVE_HASMNTOPT) || IS_BIONIC
extern char *hasmntopt (const struct mntent *mnt, const char *opt);
__hidden extern char *hasmntopt(const struct mntent *mnt, const char *opt);
#endif
#endif

View File

@ -12,8 +12,8 @@ extern "C" {
#include <stdbool.h>
#include <sys/socket.h>
#include "compiler.h"
#include "memory_utils.h"
#include "../lxc/compiler.h"
#include "../lxc/memory_utils.h"
struct netns_ifaddrs {
struct netns_ifaddrs *ifa_next;

View File

@ -6,12 +6,15 @@
#include <termios.h>
#include <sys/ioctl.h>
#include "../lxc/memory_utils.h"
/*
* Create pseudo tty ptx pty pair with @__name and set terminal
* attributes according to @__termp and @__winp and return handles for both
* ends in @__aptx and @__apts.
*/
extern int openpty(int *ptx, int *pty, char *name, const struct termios *termp,
const struct winsize *winp);
__hidden extern int openpty(int *ptx, int *pty, char *name,
const struct termios *termp,
const struct winsize *winp);
#endif

View File

@ -32,10 +32,12 @@
#include <linux/resource.h>
#include <sys/types.h>
#include "../lxc/memory_utils.h"
#define RLIM_SAVED_CUR RLIM_INFINITY
#define RLIM_SAVED_MAX RLIM_INFINITY
int prlimit(pid_t, int, const struct rlimit*, struct rlimit*);
int prlimit64(pid_t, int, const struct rlimit64*, struct rlimit64*);
__hidden int prlimit(pid_t, int, const struct rlimit *, struct rlimit *);
__hidden int prlimit64(pid_t, int, const struct rlimit64 *, struct rlimit64 *);
#endif

View File

@ -20,6 +20,6 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#include "compiler.h"
#include "../lxc/compiler.h"
__hidden extern char *strchrnul(const char *s, int c_in);

View File

@ -22,8 +22,9 @@
#ifndef _STRLCAT_H
#define _STRLCAT_H
#include "../lxc/compiler.h"
#include <stdio.h>
extern size_t strlcat(char *src, const char *append, size_t len);
__hidden extern size_t strlcat(char *src, const char *append, size_t len);
#endif

View File

@ -22,8 +22,9 @@
#ifndef _STRLCPY_H
#define _STRLCPY_H
#include "../lxc/compiler.h"
#include <stdio.h>
extern size_t strlcpy(char *, const char *, size_t);
__hidden extern size_t strlcpy(char *, const char *, size_t);
#endif

View File

@ -22,6 +22,8 @@ noinst_HEADERS = api_extensions.h \
file_utils.h \
hlist.h \
../include/strchrnul.h \
../include/strlcat.h \
../include/strlcpy.h \
../include/netns_ifaddrs.h \
initutils.h \
list.h \
@ -400,6 +402,33 @@ endif
if !HAVE_STRCHRNUL
lxc_attach_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_attach_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_attach_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_attach_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_attach_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_attach_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_attach_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_autostart_SOURCES = tools/lxc_autostart.c \
@ -461,6 +490,33 @@ endif
if !HAVE_STRCHRNUL
lxc_autostart_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_autostart_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_autostart_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_autostart_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_autostart_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_autostart_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_autostart_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
@ -522,6 +578,33 @@ endif
if !HAVE_STRCHRNUL
lxc_cgroup_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_cgroup_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_cgroup_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_cgroup_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_cgroup_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_cgroup_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_cgroup_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_config_SOURCES = tools/lxc_config.c \
@ -583,6 +666,33 @@ endif
if !HAVE_STRCHRNUL
lxc_config_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_config_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_config_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_config_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_config_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_config_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_config_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_console_SOURCES = tools/lxc_console.c \
@ -644,6 +754,33 @@ endif
if !HAVE_STRCHRNUL
lxc_console_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_console_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_console_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_console_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_console_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_console_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_console_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_destroy_SOURCES = tools/lxc_destroy.c \
@ -705,6 +842,33 @@ endif
if !HAVE_STRCHRNUL
lxc_destroy_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_destroy_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_destroy_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_destroy_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_destroy_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_destroy_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_destroy_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_device_SOURCES = tools/lxc_device.c \
@ -766,6 +930,33 @@ endif
if !HAVE_STRCHRNUL
lxc_device_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_device_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_device_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_device_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_device_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_device_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_device_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_execute_SOURCES = tools/lxc_execute.c \
@ -827,6 +1018,33 @@ endif
if !HAVE_STRCHRNUL
lxc_execute_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_execute_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_execute_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_execute_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_execute_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_execute_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_execute_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_freeze_SOURCES = tools/lxc_freeze.c \
@ -888,6 +1106,33 @@ endif
if !HAVE_STRCHRNUL
lxc_freeze_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_freeze_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_freeze_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_freeze_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_freeze_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_freeze_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_freeze_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_info_SOURCES = tools/lxc_info.c \
@ -949,6 +1194,33 @@ endif
if !HAVE_STRCHRNUL
lxc_info_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_info_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_info_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_info_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_info_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_info_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_info_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_monitor_SOURCES = tools/lxc_monitor.c \
@ -1011,6 +1283,33 @@ endif
if !HAVE_STRCHRNUL
lxc_monitor_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_monitor_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_monitor_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_monitor_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_monitor_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_monitor_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_monitor_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_ls_SOURCES = tools/lxc_ls.c \
@ -1073,6 +1372,33 @@ endif
if !HAVE_STRCHRNUL
lxc_ls_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_ls_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_ls_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_ls_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_ls_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_ls_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_ls_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_copy_SOURCES = tools/lxc_copy.c \
@ -1134,6 +1460,33 @@ endif
if !HAVE_STRCHRNUL
lxc_copy_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_copy_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_copy_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_copy_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_copy_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_copy_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_copy_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_start_SOURCES = tools/lxc_start.c \
@ -1195,6 +1548,33 @@ endif
if !HAVE_STRCHRNUL
lxc_start_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_start_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_start_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_start_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_start_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_start_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_start_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_stop_SOURCES = tools/lxc_stop.c \
@ -1256,6 +1636,33 @@ endif
if !HAVE_STRCHRNUL
lxc_stop_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_stop_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_stop_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_stop_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_stop_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_stop_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_stop_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_top_SOURCES = tools/lxc_top.c \
@ -1317,6 +1724,33 @@ endif
if !HAVE_STRCHRNUL
lxc_top_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_top_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_top_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_top_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_top_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_top_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_top_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
@ -1378,6 +1812,33 @@ endif
if !HAVE_STRCHRNUL
lxc_unfreeze_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_unfreeze_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_unfreeze_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_unfreeze_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_unfreeze_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_unfreeze_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_unfreeze_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_unshare_SOURCES = tools/lxc_unshare.c \
@ -1441,6 +1902,33 @@ endif
if !HAVE_STRCHRNUL
lxc_unshare_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_unshare_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_unshare_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_unshare_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_unshare_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_unshare_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_unshare_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_wait_SOURCES = tools/lxc_wait.c \
@ -1502,6 +1990,33 @@ endif
if !HAVE_STRCHRNUL
lxc_wait_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_wait_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_wait_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_wait_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_wait_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_wait_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_wait_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_create_SOURCES = tools/lxc_create.c \
@ -1563,6 +2078,33 @@ endif
if !HAVE_STRCHRNUL
lxc_create_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_create_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_create_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_create_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_create_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_create_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_create_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
@ -1624,6 +2166,33 @@ endif
if !HAVE_STRCHRNUL
lxc_snapshot_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_snapshot_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_snapshot_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_snapshot_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_snapshot_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_snapshot_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_snapshot_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
@ -1686,6 +2255,32 @@ if !HAVE_STRCHRNUL
lxc_checkpoint_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_checkpoint_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_checkpoint_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_checkpoint_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_checkpoint_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_checkpoint_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_checkpoint_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
endif
@ -1702,6 +2297,15 @@ init_lxc_SOURCES = cmd/lxc_init.c \
memory_utils.h \
namespace.c namespace.h \
string_utils.c string_utils.h
if !HAVE_STRLCPY
init_lxc_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
init_lxc_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
init_lxc_LDFLAGS = -pthread
lxc_monitord_SOURCES = cmd/lxc_monitord.c
@ -1763,6 +2367,33 @@ endif
if !HAVE_STRCHRNUL
lxc_monitord_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_monitord_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_monitord_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_monitord_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_monitord_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_monitord_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_monitord_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_user_nic_SOURCES = cmd/lxc_user_nic.c
@ -1826,6 +2457,33 @@ endif
if !HAVE_STRCHRNUL
lxc_user_nic_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_user_nic_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_user_nic_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_user_nic_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_user_nic_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_user_nic_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_user_nic_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c
@ -1891,6 +2549,33 @@ endif
if !HAVE_STRCHRNUL
lxc_usernsexec_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_usernsexec_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_usernsexec_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_usernsexec_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_usernsexec_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_usernsexec_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_usernsexec_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
endif
endif

View File

@ -12,9 +12,12 @@
* a comma-separated list of controllers.
*/
#include "config.h"
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
@ -39,7 +42,6 @@
#include "commands.h"
#include "commands_utils.h"
#include "conf.h"
#include "config.h"
#include "error_utils.h"
#include "log.h"
#include "macro.h"

View File

@ -14,6 +14,10 @@
#include "include/strlcat.h"
#endif
#ifndef HAVE_STRLCPY
#include "include/strlcpy.h"
#endif
#ifndef HAVE_STRCHRNUL
#include "include/strchrnul.h"
#endif

View File

@ -1,8 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include "config.h"
#include <fcntl.h>
#include <libgen.h>
#include <stdio.h>
@ -14,9 +13,8 @@
#include <lxc/lxccontainer.h>
#include "arguments.h"
#include "config.h"
#include "log.h"
#include "utils.h"
#include "file_utils.h"
lxc_log_define(lxc_destroy, lxc);

View File

@ -79,6 +79,33 @@ if !HAVE_STRCHRNUL
lxc_test_api_reboot_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_api_reboot_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_api_reboot_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_api_reboot_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_api_reboot_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_api_reboot_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_api_reboot_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_apparmor_SOURCES = aa.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
@ -133,6 +160,33 @@ if !HAVE_STRCHRNUL
lxc_test_apparmor_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_apparmor_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_apparmor_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_apparmor_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_apparmor_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_apparmor_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_apparmor_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_attach_SOURCES = attach.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
@ -187,6 +241,33 @@ if !HAVE_STRCHRNUL
lxc_test_attach_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_attach_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_attach_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_attach_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_attach_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_attach_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_attach_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_basic_SOURCES = basic.c
lxc_test_cgpath_SOURCES = cgpath.c \
../lxc/af_unix.c ../lxc/af_unix.h \
@ -242,6 +323,33 @@ if !HAVE_STRCHRNUL
lxc_test_cgpath_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_cgpath_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_cgpath_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_cgpath_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_cgpath_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_cgpath_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_cgpath_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_clonetest_SOURCES = clonetest.c
lxc_test_concurrent_SOURCES = concurrent.c
lxc_test_config_jump_table_SOURCES = config_jump_table.c \
@ -299,6 +407,33 @@ if !HAVE_STRCHRNUL
lxc_test_config_jump_table_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_config_jump_table_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_config_jump_table_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_config_jump_table_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_config_jump_table_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_config_jump_table_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_config_jump_table_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_console_SOURCES = console.c
lxc_test_console_log_SOURCES = console_log.c lxctest.h
lxc_test_containertests_SOURCES = containertests.c
@ -360,6 +495,33 @@ if !HAVE_STRCHRNUL
lxc_test_device_add_remove_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_device_add_remove_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_device_add_remove_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_device_add_remove_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_device_add_remove_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_device_add_remove_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_device_add_remove_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_getkeys_SOURCES = getkeys.c
lxc_test_get_item_SOURCES = get_item.c \
../lxc/af_unix.c ../lxc/af_unix.h \
@ -415,6 +577,33 @@ if !HAVE_STRCHRNUL
lxc_test_get_item_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_get_item_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_get_item_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_get_item_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_get_item_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_get_item_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_get_item_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_list_SOURCES = list.c
lxc_test_locktests_SOURCES = locktests.c \
../lxc/af_unix.c ../lxc/af_unix.h \
@ -470,6 +659,33 @@ if !HAVE_STRCHRNUL
lxc_test_locktests_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_locktests_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_locktests_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_locktests_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_locktests_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_locktests_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_locktests_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_lxcpath_SOURCES = lxcpath.c
lxc_test_may_control_SOURCES = may_control.c
lxc_test_mount_injection_SOURCES = mount_injection.c \
@ -527,6 +743,33 @@ if !HAVE_STRCHRNUL
lxc_test_mount_injection_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_mount_injection_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_mount_injection_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_mount_injection_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_mount_injection_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_mount_injection_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_mount_injection_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_parse_config_file_SOURCES = parse_config_file.c \
lxctest.h \
../lxc/af_unix.c ../lxc/af_unix.h \
@ -582,6 +825,33 @@ if !HAVE_STRCHRNUL
lxc_test_parse_config_file_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_parse_config_file_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_parse_config_file_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_parse_config_file_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_parse_config_file_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_parse_config_file_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_parse_config_file_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_raw_clone_SOURCES = lxc_raw_clone.c \
lxctest.h \
../lxc/af_unix.c ../lxc/af_unix.h \
@ -637,20 +907,131 @@ if !HAVE_STRCHRNUL
lxc_test_raw_clone_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_raw_clone_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_raw_clone_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_raw_clone_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_raw_clone_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_raw_clone_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_raw_clone_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_reboot_SOURCES = reboot.c
lxc_test_saveconfig_SOURCES = saveconfig.c
lxc_test_share_ns_SOURCES = share_ns.c \
lxctest.h \
../lxc/compiler.h
if !HAVE_STRLCPY
lxc_test_share_ns_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_share_ns_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_share_ns_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_share_ns_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_share_ns_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_share_ns_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_shortlived_SOURCES = shortlived.c \
../lxc/file_utils.c ../lxc/file_utils.h \
../lxc/string_utils.c ../lxc/string_utils.h
if !HAVE_STRLCPY
lxc_test_shortlived_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_shortlived_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_shortlived_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_shortlived_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_shortlived_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_shortlived_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_shutdowntest_SOURCES = shutdowntest.c
lxc_test_snapshot_SOURCES = snapshot.c
lxc_test_startone_SOURCES = startone.c
lxc_test_state_server_SOURCES = state_server.c \
lxctest.h \
../lxc/compiler.h
if !HAVE_STRLCPY
lxc_test_state_server_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_state_server_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_state_server_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_state_server_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_state_server_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_state_server_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_utils_SOURCES = lxc-test-utils.c \
lxctest.h \
../lxc/af_unix.c ../lxc/af_unix.h \
@ -706,6 +1087,33 @@ if !HAVE_STRCHRNUL
lxc_test_utils_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_utils_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_utils_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_utils_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_utils_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_utils_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_utils_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_sys_mixed_SOURCES = sys_mixed.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
@ -760,6 +1168,33 @@ if !HAVE_STRCHRNUL
lxc_test_sys_mixed_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_sys_mixed_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_sys_mixed_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_sys_mixed_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_sys_mixed_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_sys_mixed_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_sys_mixed_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
lxc_test_rootfs_options_SOURCES = rootfs_options.c \
../lxc/af_unix.c ../lxc/af_unix.h \
../lxc/caps.c ../lxc/caps.h \
@ -814,6 +1249,33 @@ if !HAVE_STRCHRNUL
lxc_test_rootfs_options_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
endif
if !HAVE_STRLCPY
lxc_test_rootfs_options_SOURCES += ../include/strlcpy.c ../include/strlcpy.h
endif
if !HAVE_STRLCAT
lxc_test_rootfs_options_SOURCES += ../include/strlcat.c ../include/strlcat.h
endif
if !HAVE_OPENPTY
lxc_test_rootfs_options_SOURCES += ../include/openpty.c ../include/openpty.h
endif
if IS_BIONIC
lxc_test_rootfs_options_SOURCES += ../include/fexecve.c ../include/fexecve.h \
../include/lxcmntent.c ../include/lxcmntent.h
endif
if !HAVE_GETGRGID_R
lxc_test_rootfs_options_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
endif
if !HAVE_PRLIMIT
if HAVE_PRLIMIT64
lxc_test_rootfs_options_SOURCES += ../include/prlimit.c ../include/prlimit.h
endif
endif
AM_CFLAGS += -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
-DLXCPATH=\"$(LXCPATH)\" \
-DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \