From: Ralf Habacker Date: Wed, 3 Nov 2021 08:35:24 +0000 (+0100) Subject: Add configure checks for vsnprintf and vasprintf to cmake build system X-Git-Tag: dbus-1.13.20~32^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0590b44a8fbb4a3b39edd5a9d0a535b1dc51ec94;p=thirdparty%2Fdbus.git Add configure checks for vsnprintf and vasprintf to cmake build system --- diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake index 7bc789f0e..a78b63b25 100644 --- a/cmake/ConfigureChecks.cmake +++ b/cmake/ConfigureChecks.cmake @@ -69,6 +69,8 @@ check_symbol_exists(getrandom "sys/random.h" HAVE_GETRANDOM) check_symbol_exists(getrlimit "sys/resource.h;sys/time.h" HAVE_GETRLIMIT) check_symbol_exists(prlimit "sys/resource.h;sys/time.h" HAVE_PRLIMIT) check_symbol_exists(setrlimit "sys/resource.h;sys/time.h" HAVE_SETRLIMIT) +check_symbol_exists(vasprintf "stdio.h" HAVE_VASPRINTF) +check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF) check_struct_member(cmsgcred cmcred_pid "sys/types.h;sys/socket.h" HAVE_CMSGCRED) # dbus-sysdeps.c diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index f45a8fb3b..443db0ca6 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -229,12 +229,16 @@ #cmakedefine HAVE_SETRLIMIT 1 #cmakedefine HAVE_UNIX_FD_PASSING 1 #cmakedefine HAVE_SYSTEMD +#cmakedefine HAVE_VASPRINTF 1 +#cmakedefine HAVE_VSNPRINTF 1 /* Define to use epoll(4) on Linux */ #cmakedefine DBUS_HAVE_LINUX_EPOLL 1 /* Use the gcc __sync extension */ #cmakedefine DBUS_USE_SYNC 1 +#cmakedefine HAVE_VASPRINTF 1 +#cmakedefine HAVE_VSNPRINTF 1 // structs /* Define to 1 if you have struct cmsgred */