From 1de3db567832b6be0fea04ca297f1af4203f4842 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 27 Sep 2011 17:32:11 -0500 Subject: [PATCH] Make getpwnam_r() check work on Ubuntu NULL is not defined w/o including stddefs.h, so the test program fails to compile. A simple s/NULL/0/ fixes it. --- cf/check-getpwnam_r-posix.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cf/check-getpwnam_r-posix.m4 b/cf/check-getpwnam_r-posix.m4 index 623712c23..aab9eaf5c 100644 --- a/cf/check-getpwnam_r-posix.m4 +++ b/cf/check-getpwnam_r-posix.m4 @@ -14,7 +14,7 @@ if test "$ac_cv_func_getpwnam_r" = yes; then int main(int argc, char **argv) { struct passwd pw, *pwd; - return getpwnam_r("", &pw, NULL, 0, &pwd) < 0; + return getpwnam_r("", &pw, 0, 0, &pwd) < 0; } ]])],[ac_cv_func_getpwnam_r_posix=yes],[ac_cv_func_getpwnam_r_posix=no],[:]) LIBS="$ac_libs") @@ -26,7 +26,7 @@ LIBS="$ac_libs") int main(int argc, char **argv) { struct passwd pw, *pwd; - return getpwnam_r("", &pw, NULL, 0, &pwd) < 0; + return getpwnam_r("", &pw, 0, 0, &pwd) < 0; } ]])],[ac_cv_func_getpwnam_r_posix_def=no],[ac_cv_func_getpwnam_r_posix_def=yes],[:]) LIBS="$ac_libs")