From be677d800bc6f77c9d518ddd7970cd7150504450 Mon Sep 17 00:00:00 2001 From: Tom Keiser Date: Tue, 26 Aug 2008 15:11:46 +0000 Subject: [PATCH] DEVEL15-studio12-solaris-updates-20080826 LICENSE IPL10 FIXES 113671 update so we build with studio 12 on solaris (cherry picked from commit 4d245c6a19394d54a241bd612016b10d1113ee7b) --- src/pam/afs_auth.c | 2 ++ src/util/afsutil.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pam/afs_auth.c b/src/pam/afs_auth.c index 0a0325867..7f70fe70a 100644 --- a/src/pam/afs_auth.c +++ b/src/pam/afs_auth.c @@ -192,6 +192,8 @@ pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc, #else #if defined(AFS_LINUX20_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_NBSD_ENV) upwd = getpwnam(user); +#elif defined(_POSIX_PTHREAD_SEMANTICS) && defined(AFS_SUN5_ENV) + getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf), &upwd); #else upwd = getpwnam_r(user, &unix_pwd, upwd_buf, sizeof(upwd_buf)); #endif diff --git a/src/util/afsutil.h b/src/util/afsutil.h index 3a036134d..dceb2e36b 100644 --- a/src/util/afsutil.h +++ b/src/util/afsutil.h @@ -70,7 +70,7 @@ afs_vsnprintf( /*@out@ */ char *p, size_t avail, const char *fmt, /* Need a thead safe ctime for pthread builds. Use std ctime for LWP */ #if defined(AFS_PTHREAD_ENV) && !defined(AFS_NT40_ENV) -#ifdef AFS_SUN5_ENV +#if defined(AFS_SUN5_ENV) && !defined(_POSIX_PTHREAD_SEMANTICS) && (_POSIX_C_SOURCE - 0 < 199506L) #define afs_ctime(C, B, L) ctime_r(C, B, L) #else /* Cast is for platforms which do not prototype ctime_r */ -- 2.39.5