summaryrefslogtreecommitdiff
path: root/misc/root/patches/patch-ad
blob: f51da3ba2fb1867af6de93b81e600eb3c30f492f (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.3 2010/02/26 10:56:38 drochner Exp $

--- io/io/src/TMapFile.cxx.orig	2006-05-26 17:50:02.000000000 +0200
+++ io/io/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) {