struct passwd *pw;
char *name;
int name_len;
-#ifdef HAVE_GETPWNAM_R
+#if defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R)
struct passwd pwbuf;
int buflen;
char *buf;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to convert posix passwd struct to array");
RETVAL_FALSE;
}
-#ifdef HAVE_GETPWNAM_R
+#if defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWNAM_R)
efree(buf);
#endif
}
PHP_FUNCTION(posix_getpwuid)
{
long uid;
-#ifdef HAVE_GETPWUID_R
+#if defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R)
struct passwd _pw;
struct passwd *retpwptr = NULL;
int pwbuflen;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to convert posix passwd struct to array");
RETVAL_FALSE;
}
-#ifdef HAVE_GETPWUID_R
+#if defined(_SC_GETPW_R_SIZE_MAX) && defined(HAVE_GETPWUID_R)
efree(pwbuf);
#endif
}