Bug 784 - Build configure assumess that having getpwnam means there is endpwent function available
Build configure assumess that having getpwnam means there is endpwent functio...
Product: unbound
Classification: Unclassified
Component: server
All All
: P5 major
Assigned To: unbound team
Depends on:
  Show dependency treegraph
Reported: 2016-06-26 19:54 CEST by Marek Sebera
Modified: 2016-06-27 10:01 CEST (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Marek Sebera 2016-06-26 19:54:44 CEST

I've been compiling 1.5.9 for Android, and found out, that function "endpwent" is not available, but configure.ac only checks for availability of "getpwnam".

This is not true for Android, building the project with NDK r11 and above (r12 too), fix for my build was to sed the variable in config.h to undef the HAVE_PWNAM, but I don't think it's best solution available.

endpwent was never really implemented in Android Bionic project, but in r10 and previous it's call symbol was falsely exported, so building Unbound 1.5.9 with Android NDK r10 will succeed.

Sed call here: https://github.com/smarek/android-unbound-dns/blob/master/build.sh#L62
Comment 1 Wouter Wijngaards 2016-06-27 10:01:46 CEST
Hi Marek,

Thank you for the report, I did not know that endpwent was missing on some systems.  Fixed configure to detect endpwent separately from getpwnam.

Best regards, Wouter