nwrap: Add compatibility for musl-libc 1.1
authorDennis Schridde <dennis.schridde@uni-heidelberg.de>
Mon, 27 Mar 2017 14:26:11 +0000 (16:26 +0200)
committerAndreas Schneider <asn@samba.org>
Wed, 31 May 2017 13:26:52 +0000 (15:26 +0200)
commit09bb07c4aec3da9d555d0a608b2c98dde46ff886
treeedcb080abc54c22a4848c76478f032f70d1097c4
parentbba5eecf377b2617dfa25f78bcc11a240c3f5266
nwrap: Add compatibility for musl-libc 1.1

The major difference is that getpwent_r and getgrent_r do not exist in
musl-libc. Hence it is sufficient to compile the wrappers for those only
conditionally.

Tested with musl-libc 1.1.15-r5 on Alpine Linux 3.5. Also confirmed to
not break with GNU libc 2.24-8 on Debian "Stretch" / 9.

Signed-Off-By: Dennis Schridde <dennis.schridde@uni-heidelberg.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
src/nss_wrapper.c