summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwchang0222%aol.com <devnull@localhost>2004-03-09 01:43:11 +0000
committerwchang0222%aol.com <devnull@localhost>2004-03-09 01:43:11 +0000
commit03f1483c9076ed38e9b3d01bddae096750aed7ee (patch)
tree460d9c913f01c9f9560c700b31fbe590941449b4
parentc28f4c5269f49c291eb4c49aa1acc3e060ea1214 (diff)
downloadnspr-hg-03f1483c9076ed38e9b3d01bddae096750aed7ee.tar.gz
Bugzilla bug 200162: pass 0 as the third and fourth arguments to sem_open
to work around a bug in sem_open on HP-UX 11.23 or earlier. The patch is contributed by Grace Lu of HP. r=wtc. Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rw-r--r--pr/src/pthreads/ptsynch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pr/src/pthreads/ptsynch.c b/pr/src/pthreads/ptsynch.c
index ae1eb0da..c3e50d5a 100644
--- a/pr/src/pthreads/ptsynch.c
+++ b/pr/src/pthreads/ptsynch.c
@@ -714,7 +714,12 @@ PR_IMPLEMENT(PRSem *) PR_OpenSemaphore(
}
else
{
+#ifdef HPUX
+ /* Pass 0 as the mode and value arguments to work around a bug. */
+ sem->sem = sem_open(osname, 0, 0, 0);
+#else
sem->sem = sem_open(osname, 0);
+#endif
}
if ((sem_t *) -1 == sem->sem)
{