mirror of
git://github.com/lxc/lxc
synced 2025-09-01 17:29:30 +00:00
tree-wide: fix HAVE_* checks
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
#include "memory_utils.h"
|
#include "memory_utils.h"
|
||||||
#include "process_utils.h"
|
#include "process_utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -304,7 +304,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \
|
|||||||
* Helper macro to define errno string.
|
* Helper macro to define errno string.
|
||||||
*/
|
*/
|
||||||
#if HAVE_STRERROR_R
|
#if HAVE_STRERROR_R
|
||||||
#ifndef HAVE_DECL_STRERROR_R
|
#if !HAVE_DECL_STRERROR_R
|
||||||
#ifdef STRERROR_R_CHAR_P
|
#ifdef STRERROR_R_CHAR_P
|
||||||
char *strerror_r(int errnum, char *buf, size_t buflen);
|
char *strerror_r(int errnum, char *buf, size_t buflen);
|
||||||
#else
|
#else
|
||||||
|
@@ -84,7 +84,7 @@ static inline void cleanup_handler(struct lxc_async_descr *descr,
|
|||||||
delete_handler(handler);
|
delete_handler(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_LIBURING
|
#if !HAVE_LIBURING
|
||||||
static inline int __lxc_mainloop_io_uring(struct lxc_async_descr *descr,
|
static inline int __lxc_mainloop_io_uring(struct lxc_async_descr *descr,
|
||||||
int timeout_ms)
|
int timeout_ms)
|
||||||
{
|
{
|
||||||
@@ -514,7 +514,7 @@ void lxc_mainloop_close(struct lxc_async_descr *descr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (descr->type == LXC_MAINLOOP_IO_URING) {
|
if (descr->type == LXC_MAINLOOP_IO_URING) {
|
||||||
#ifdef HAVE_LIBURING
|
#if HAVE_LIBURING
|
||||||
io_uring_queue_exit(descr->ring);
|
io_uring_queue_exit(descr->ring);
|
||||||
munmap(descr->ring, sizeof(struct io_uring));
|
munmap(descr->ring, sizeof(struct io_uring));
|
||||||
#else
|
#else
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include "state.h"
|
#include "state.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
#include "syscall_wrappers.h"
|
#include "syscall_wrappers.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -31,11 +31,11 @@
|
|||||||
#include <security/_pam_macros.h>
|
#include <security/_pam_macros.h>
|
||||||
#include <security/pam_modules.h>
|
#include <security/pam_modules.h>
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRLCAT
|
#if !HAVE_STRLCAT
|
||||||
#include "strlcat.h"
|
#include "strlcat.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -23,11 +23,11 @@
|
|||||||
#include "storage.h"
|
#include "storage.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRLCAT
|
#if !HAVE_STRLCAT
|
||||||
#include "strlcat.h"
|
#include "strlcat.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
#include "syscall_wrappers.h"
|
#include "syscall_wrappers.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#include "storage_utils.h"
|
#include "storage_utils.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "zfs.h"
|
#include "zfs.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
#include "syscall_wrappers.h"
|
#include "syscall_wrappers.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRCHRNUL
|
#if !HAVE_STRCHRNUL
|
||||||
#include "strchrnul.h"
|
#include "strchrnul.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#include "storage_utils.h"
|
#include "storage_utils.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_GETSUBOPT
|
#if !HAVE_GETSUBOPT
|
||||||
#include "include/getsubopt.h"
|
#include "include/getsubopt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
#include "lxctest.h"
|
#include "lxctest.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
#include "../lxc/lxc.h"
|
#include "../lxc/lxc.h"
|
||||||
#include "../lxc/memory_utils.h"
|
#include "../lxc/memory_utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
#include <lxc/lxccontainer.h>
|
#include <lxc/lxccontainer.h>
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
#include "lxctest.h"
|
#include "lxctest.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#include "memory_utils.h"
|
#include "memory_utils.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
#include "lxctest.h"
|
#include "lxctest.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
#include "lxctest.h"
|
#include "lxctest.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !HAVE_STRLCPY
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user