summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdtime
diff options
context:
space:
mode:
authorjulian <julian@FreeBSD.org>1998-02-18 01:20:33 +0000
committerjulian <julian@FreeBSD.org>1998-02-18 01:20:33 +0000
commit6d639f103c1aa569f6322279c34d9479bac16505 (patch)
treecc0b7b43f4b5c2d41829f82122695c753018a0e9 /lib/libc/stdtime
parent62e49a374eb3e45ff4db78edf773aab1059b5a22 (diff)
downloadFreeBSD-src-6d639f103c1aa569f6322279c34d9479bac16505.zip
FreeBSD-src-6d639f103c1aa569f6322279c34d9479bac16505.tar.gz
Submitted by: Jeremy Allison (jallison@whistle.com)
fix a slight confusion about which draft of threads we are supporting. this allows something as big and ugly as samba to be compiled with libc_r and still work! our user-level pthreads seems amazingly robust!
Diffstat (limited to 'lib/libc/stdtime')
-rw-r--r--lib/libc/stdtime/localtime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/stdtime/localtime.c b/lib/libc/stdtime/localtime.c
index 3438cc6..204bac0 100644
--- a/lib/libc/stdtime/localtime.c
+++ b/lib/libc/stdtime/localtime.c
@@ -1191,9 +1191,11 @@ const time_t * const timep;
}
}
pthread_mutex_unlock(&gmtime_mutex);
- if ((p_tm = pthread_getspecific(gmtime_key)) != 0) {
- return(NULL);
- } else if (p_tm == NULL) {
+ /*
+ * Changed to follow draft 4 pthreads standard, which
+ * is what BSD currently has.
+ */
+ if ((p_tm = pthread_getspecific(gmtime_key)) == NULL) {
if ((p_tm = (struct tm *)malloc(sizeof(struct tm))) == NULL) {
return(NULL);
}
OpenPOWER on IntegriCloud