summaryrefslogtreecommitdiff
path: root/misc/root/patches/patch-ad
blob: 629cf924b19fc0f4395efd60ee14c5724fabcd1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$NetBSD: patch-ad,v 1.2 2006/05/27 12:38:27 drochner Exp $

--- base/src/TMapFile.cxx.orig	2006-05-26 17:50:02.000000000 +0200
+++ base/src/TMapFile.cxx
@@ -104,7 +104,7 @@
 #include <sys/sem.h>
 #if defined(R__HPUX) || (defined (R__ALPHA) && !defined(R__FBSD)) || \
     defined (R__SOLARIS) || defined(R__AIX) || defined(R__HIUX) || \
-    __GLIBC_MINOR__ > 0
+    __GLIBC_MINOR__ > 0 || defined(__NetBSD__)
 union semun {
    int val;                      // value for SETVAL
    struct semid_ds *buf;         // buffer for IPC_STAT & IPC_SET
@@ -760,8 +760,7 @@ void TMapFile::CreateSemaphore(int pid)
 #ifdef HAVE_SEMOP
 #ifndef WIN32
    // create semaphore to synchronize access (should use read/write lock)
-   fSemaphore = semget(IPC_PRIVATE, 1, SEM_R|SEM_A|(SEM_R>>3)|(SEM_A>>3)|
-                                       (SEM_R>>6)|(SEM_A>>6));
+   fSemaphore = semget(IPC_PRIVATE, 1, 0);
 
    // set semaphore to 1
    if (fSemaphore != -1) {