From: Christian Brauner Date: Mon, 27 Sep 2021 10:15:05 +0000 (+0200) Subject: tree-wide: fix HAVE_* checks X-Git-Tag: lxc-5.0.0~85^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34498deaa342eb50c74474e316bad0b078770a6f;p=thirdparty%2Flxc.git tree-wide: fix HAVE_* checks Signed-off-by: Christian Brauner --- diff --git a/src/lxc/initutils.c b/src/lxc/initutils.c index 218125c1a..24baecc88 100644 --- a/src/lxc/initutils.c +++ b/src/lxc/initutils.c @@ -17,7 +17,7 @@ #include "memory_utils.h" #include "process_utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/lxc/log.h b/src/lxc/log.h index 80fb49c36..2a6da40e9 100644 --- a/src/lxc/log.h +++ b/src/lxc/log.h @@ -304,7 +304,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ * Helper macro to define errno string. */ #if HAVE_STRERROR_R - #ifndef HAVE_DECL_STRERROR_R + #if !HAVE_DECL_STRERROR_R #ifdef STRERROR_R_CHAR_P char *strerror_r(int errnum, char *buf, size_t buflen); #else diff --git a/src/lxc/mainloop.c b/src/lxc/mainloop.c index ba20224ae..7c8f5d86a 100644 --- a/src/lxc/mainloop.c +++ b/src/lxc/mainloop.c @@ -84,7 +84,7 @@ static inline void cleanup_handler(struct lxc_async_descr *descr, delete_handler(handler); } -#ifndef HAVE_LIBURING +#if !HAVE_LIBURING static inline int __lxc_mainloop_io_uring(struct lxc_async_descr *descr, int timeout_ms) { @@ -514,7 +514,7 @@ void lxc_mainloop_close(struct lxc_async_descr *descr) } if (descr->type == LXC_MAINLOOP_IO_URING) { -#ifdef HAVE_LIBURING +#if HAVE_LIBURING io_uring_queue_exit(descr->ring); munmap(descr->ring, sizeof(struct io_uring)); #else diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c index c9d4bcc9e..3ae807f1e 100644 --- a/src/lxc/monitor.c +++ b/src/lxc/monitor.c @@ -30,7 +30,7 @@ #include "state.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/lxc/network.c b/src/lxc/network.c index b87cf57e7..ad43694f2 100644 --- a/src/lxc/network.c +++ b/src/lxc/network.c @@ -39,7 +39,7 @@ #include "syscall_wrappers.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/lxc/pam/pam_cgfs.c b/src/lxc/pam/pam_cgfs.c index 01167fa47..31e671062 100644 --- a/src/lxc/pam/pam_cgfs.c +++ b/src/lxc/pam/pam_cgfs.c @@ -31,11 +31,11 @@ #include #include -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif -#ifndef HAVE_STRLCAT +#if !HAVE_STRLCAT #include "strlcat.h" #endif diff --git a/src/lxc/storage/btrfs.c b/src/lxc/storage/btrfs.c index 270eb057e..686a8986c 100644 --- a/src/lxc/storage/btrfs.c +++ b/src/lxc/storage/btrfs.c @@ -23,11 +23,11 @@ #include "storage.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif -#ifndef HAVE_STRLCAT +#if !HAVE_STRLCAT #include "strlcat.h" #endif diff --git a/src/lxc/storage/nbd.c b/src/lxc/storage/nbd.c index e27a98102..c35f9e865 100644 --- a/src/lxc/storage/nbd.c +++ b/src/lxc/storage/nbd.c @@ -19,7 +19,7 @@ #include "syscall_wrappers.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/lxc/storage/rbd.c b/src/lxc/storage/rbd.c index e1505e264..ea3593bd7 100644 --- a/src/lxc/storage/rbd.c +++ b/src/lxc/storage/rbd.c @@ -14,7 +14,7 @@ #include "storage_utils.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/lxc/storage/storage.c b/src/lxc/storage/storage.c index 8fb8fe6b4..c840c68de 100644 --- a/src/lxc/storage/storage.c +++ b/src/lxc/storage/storage.c @@ -40,7 +40,7 @@ #include "utils.h" #include "zfs.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/lxc/storage/storage_utils.c b/src/lxc/storage/storage_utils.c index f50682159..4f329bd90 100644 --- a/src/lxc/storage/storage_utils.c +++ b/src/lxc/storage/storage_utils.c @@ -28,7 +28,7 @@ #include "syscall_wrappers.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/lxc/tools/include/getsubopt.c b/src/lxc/tools/include/getsubopt.c index 96d582ac0..01d91d690 100644 --- a/src/lxc/tools/include/getsubopt.c +++ b/src/lxc/tools/include/getsubopt.c @@ -6,7 +6,7 @@ #include "config.h" -#ifndef HAVE_STRCHRNUL +#if !HAVE_STRCHRNUL #include "strchrnul.h" #endif diff --git a/src/lxc/tools/lxc_copy.c b/src/lxc/tools/lxc_copy.c index 976efc36f..c7158cc0b 100644 --- a/src/lxc/tools/lxc_copy.c +++ b/src/lxc/tools/lxc_copy.c @@ -24,7 +24,7 @@ #include "storage_utils.h" #include "utils.h" -#ifndef HAVE_GETSUBOPT +#if !HAVE_GETSUBOPT #include "include/getsubopt.h" #endif diff --git a/src/tests/api_reboot.c b/src/tests/api_reboot.c index bf051b8b5..af12d6237 100644 --- a/src/tests/api_reboot.c +++ b/src/tests/api_reboot.c @@ -31,7 +31,7 @@ #include "lxctest.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/tests/arch_parse.c b/src/tests/arch_parse.c index 95792ddd1..f8a0a46d2 100644 --- a/src/tests/arch_parse.c +++ b/src/tests/arch_parse.c @@ -30,7 +30,7 @@ #include "../lxc/lxc.h" #include "../lxc/memory_utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/tests/attach.c b/src/tests/attach.c index f4ff5efbb..45c93390b 100644 --- a/src/tests/attach.c +++ b/src/tests/attach.c @@ -32,7 +32,7 @@ #include -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/tests/cgpath.c b/src/tests/cgpath.c index 81b2162fe..46ae0259d 100644 --- a/src/tests/cgpath.c +++ b/src/tests/cgpath.c @@ -35,7 +35,7 @@ #include "lxctest.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/tests/device_add_remove.c b/src/tests/device_add_remove.c index a03f7d19a..eb146090f 100644 --- a/src/tests/device_add_remove.c +++ b/src/tests/device_add_remove.c @@ -24,7 +24,7 @@ #include "memory_utils.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/tests/get_item.c b/src/tests/get_item.c index 5ebe5508d..e5836f350 100644 --- a/src/tests/get_item.c +++ b/src/tests/get_item.c @@ -31,7 +31,7 @@ #include "lxctest.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif diff --git a/src/tests/shortlived.c b/src/tests/shortlived.c index c66e97ede..7c723ead2 100644 --- a/src/tests/shortlived.c +++ b/src/tests/shortlived.c @@ -31,7 +31,7 @@ #include "lxctest.h" #include "utils.h" -#ifndef HAVE_STRLCPY +#if !HAVE_STRLCPY #include "strlcpy.h" #endif