summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorBen Laurie <ben@apache.org>2000-12-30 20:56:35 +0000
committerBen Laurie <ben@apache.org>2000-12-30 20:56:35 +0000
commit9e761a59f13ef68c1b640a80d76dd14734d1d545 (patch)
treeac0e83e58e9a4afe5437d800aa70d940ce50f2be /user
parentef942f6a80108addd2a8f51359b7deb9597f4ac8 (diff)
downloadapr-9e761a59f13ef68c1b640a80d76dd14734d1d545.tar.gz
Compensate for missing getpwnam_r on FreeBSD 3.2.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60992 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'user')
-rw-r--r--user/unix/homedir.c2
-rw-r--r--user/unix/userinfo.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/user/unix/homedir.c b/user/unix/homedir.c
index ae02406b4..56d10fa7f 100644
--- a/user/unix/homedir.c
+++ b/user/unix/homedir.c
@@ -71,7 +71,7 @@ apr_status_t apr_get_home_directory(char **dirname, const char *userid, apr_pool
char pwbuf[512];
#endif
-#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GETPWNAM_R)
if (!getpwnam_r(userid, &pwd, pwbuf, sizeof(pwbuf), &pw)) {
#else
if ((pw = getpwnam(userid)) != NULL) {
diff --git a/user/unix/userinfo.c b/user/unix/userinfo.c
index ae02406b4..56d10fa7f 100644
--- a/user/unix/userinfo.c
+++ b/user/unix/userinfo.c
@@ -71,7 +71,7 @@ apr_status_t apr_get_home_directory(char **dirname, const char *userid, apr_pool
char pwbuf[512];
#endif
-#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS)
+#if APR_HAS_THREADS && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && defined(HAVE_GETPWNAM_R)
if (!getpwnam_r(userid, &pwd, pwbuf, sizeof(pwbuf), &pw)) {
#else
if ((pw = getpwnam(userid)) != NULL) {