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.
This commit is contained in:
Nicolas Williams
2011-09-27 17:32:11 -05:00
parent 4ae39ce0b3
commit 1de3db5678

@@ -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")