cmake: check for getpwuid_r
authorBernhard Walle <bernhard@bwalle.de>
Sun, 27 May 2018 08:38:07 +0000 (10:38 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 28 May 2018 13:23:18 +0000 (15:23 +0200)
The autotools-based build system does it, so we do it also in CMake.

Bug: #2609
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
CMakeLists.txt
lib/curl_config.h.cmake

index 685faf9340834c3801079bf2144f0f44594f0cc3..b85e1f58d7ebd7bb42bae0f66027036c54c106d4 100644 (file)
@@ -850,6 +850,7 @@ check_symbol_exists(sigsetjmp     "${CURL_INCLUDES}" HAVE_SIGSETJMP)
 check_symbol_exists(getpass_r     "${CURL_INCLUDES}" HAVE_GETPASS_R)
 check_symbol_exists(strlcat       "${CURL_INCLUDES}" HAVE_STRLCAT)
 check_symbol_exists(getpwuid      "${CURL_INCLUDES}" HAVE_GETPWUID)
+check_symbol_exists(getpwuid_r    "${CURL_INCLUDES}" HAVE_GETPWUID_R)
 check_symbol_exists(geteuid       "${CURL_INCLUDES}" HAVE_GETEUID)
 check_symbol_exists(utime         "${CURL_INCLUDES}" HAVE_UTIME)
 check_symbol_exists(gmtime_r      "${CURL_INCLUDES}" HAVE_GMTIME_R)
index 4b12083f2961a82827ae14e5f7fa4466c2f63c72..a890d8ce6292430a0b7b2bc444ab25249241d731 100644 (file)
 /* Define to 1 if you have the `getpwuid' function. */
 #cmakedefine HAVE_GETPWUID 1
 
+/* Define to 1 if you have the `getpwuid_r' function. */
+#cmakedefine HAVE_GETPWUID_R 1
+
 /* Define to 1 if you have the `getrlimit' function. */
 #cmakedefine HAVE_GETRLIMIT 1