]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
configure: fix strchrnul conditiona compilation 3718/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 21 Mar 2021 15:02:40 +0000 (16:02 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 21 Mar 2021 15:04:35 +0000 (16:04 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
configure.ac
src/lxc/Makefile.am

index 7c7b348726fd1ca2c5a2b5c0b18dde8c2d59839d..b329b4ea772a4a8eaefbfec4fc327e88fbba03e6 100644 (file)
@@ -640,7 +640,7 @@ AC_CHECK_HEADER([ifaddrs.h],
 AC_HEADER_MAJOR
 
 # Check for some syscalls functions
-AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create move_mount open_tree execveat clone3 fsopen fspick fsconfig fsmount, openat2, close_range, statvfs, strchrnul])
+AC_CHECK_FUNCS([setns pivot_root sethostname unshare rand_r confstr faccessat gettid memfd_create move_mount open_tree execveat clone3 fsopen fspick fsconfig fsmount, openat2, close_range, statvfs])
 AC_CHECK_TYPES([__aligned_u64], [], [], [[#include <linux/types.h>]])
 AC_CHECK_TYPES([struct open_how], [], [], [[#include <linux/openat2.h>]])
 AC_CHECK_TYPES([struct clone_args], [], [], [[#include <linux/sched.h>]])
@@ -727,6 +727,10 @@ AC_CHECK_FUNCS([strlcat],
        AM_CONDITIONAL(HAVE_STRLCAT, true)
        AC_DEFINE(HAVE_STRLCAT,1,[Have strlcat]),
        AM_CONDITIONAL(HAVE_STRLCAT, false))
+AC_CHECK_FUNCS([strchrnul],
+       AM_CONDITIONAL(HAVE_STRCHRNUL, true)
+       AC_DEFINE(HAVE_STRCHRNUL,1,[Have strchnul]),
+       AM_CONDITIONAL(HAVE_STRCHRNUL, false))
 AC_CHECK_FUNCS([fmemopen],
        AM_CONDITIONAL(HAVE_FMEMOPEN, true)
        AC_DEFINE(HAVE_FMEMOPEN,1,[Have fmemopen]),
index 634396fa8242d2411ec4181218eecd07f6d58062..5938a560a292095b42a531c7222ee41a2742778b 100644 (file)
@@ -201,6 +201,10 @@ if !HAVE_STRLCAT
 liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
 endif
 
+if !HAVE_STRCHRNUL
+liblxc_la_SOURCES += ../include/strchrnul.c ../include/strchrnul.h
+endif
+
 if ENFORCE_MEMFD_REXEC
 liblxc_la_SOURCES += rexec.c rexec.h
 endif