diff --git a/.github/scripts/cmp-config.pl b/.github/scripts/cmp-config.pl index 25f7701a8c..8a5246169b 100755 --- a/.github/scripts/cmp-config.pl +++ b/.github/scripts/cmp-config.pl @@ -41,9 +41,6 @@ my %remove = ( '#define GETHOSTNAME_TYPE_ARG2 size_t' => 1, '#define HAVE_BROTLI 1' => 1, '#define HAVE_BROTLI_DECODE_H 1' => 1, - '#define HAVE_DECL_GETPWUID_R 0' => 1, - '#define HAVE_DECL_GETPWUID_R 1' => 1, - '#define HAVE_DECL_GETPWUID_R_MISSING 1' => 1, '#define HAVE_DLFCN_H 1' => 1, '#define HAVE_GSSAPI_GSSAPI_KRB5_H 1' => 1, '#define HAVE_INTTYPES_H 1' => 1, diff --git a/configure.ac b/configure.ac index f97a704682..ecb58a924c 100644 --- a/configure.ac +++ b/configure.ac @@ -4040,10 +4040,6 @@ case $host in ;; esac -AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Set if getpwuid_r() declaration is missing")], - [[#include - #include ]]) - AC_CHECK_FUNCS([\ eventfd \ fnmatch \ diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 18d52cc301..2eba74e52f 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -927,7 +927,8 @@ endings either CRLF or LF so 't' is appropriate. #define STRCONST(x) x,sizeof(x)-1 /* Some versions of the Android SDK is missing the declaration */ -#if defined(HAVE_GETPWUID_R) && defined(HAVE_DECL_GETPWUID_R_MISSING) +#if defined(HAVE_GETPWUID_R) && \ + defined(__ANDROID_API__) && (__ANDROID_API__ < 21) struct passwd; int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf, size_t buflen, struct passwd **result);