From 9c33813d835dde214c1a9449f789dd72ab3d9dc3 Mon Sep 17 00:00:00 2001 From: Bernhard Walle Date: Sun, 27 May 2018 19:51:04 +0200 Subject: configure: check for declaration of getpwuid_r On our x86 Android toolchain, getpwuid_r is implemented but the header is missing: netrc.c:81:7: error: implicit declaration of function 'getpwuid_r' [-Werror=implicit-function-declaration] Unfortunately, the function is used in curl_ntlm_wb.c, too, so I moved the prototype to curl_setup.h. Signed-off-by: Bernhard Walle Closes #2609 --- lib/curl_setup.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib') diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 5593a3b5c..9696a07d0 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -800,4 +800,11 @@ endings either CRLF or LF so 't' is appropriate. #define CURL_SA_FAMILY_T unsigned short #endif +/* Some versions of the Android SDK is missing the declaration */ +#if defined(HAVE_GETPWUID_R) && defined(HAVE_DECL_GETPWUID_R_MISSING) +struct passwd; +int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, + size_t buflen, struct passwd **result); +#endif + #endif /* HEADER_CURL_SETUP_H */ -- cgit v1.2.3