summaryrefslogtreecommitdiff
path: root/mail/thunderbird/patches/patch-dx
blob: 80005facff081b52908ea36bcfce996f61ef90dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$NetBSD: patch-dx,v 1.1 2007/06/15 16:11:42 joerg Exp $

--- db/sqlite3/src/os_unix.c.orig	2006-05-22 19:12:32.000000000 +0000
+++ db/sqlite3/src/os_unix.c
@@ -443,6 +443,7 @@ static int lockTrace(int fd, int op, str
 #define fcntl lockTrace
 #endif /* SQLITE_LOCK_TRACE */
 
+#if SQLITE_THREAD_OVERRIDE_LOCK == -1
 /*
 ** The testThreadLockingBehavior() routine launches two separate
 ** threads on this routine.  This routine attempts to lock a file
@@ -483,6 +484,7 @@ static void testThreadLockingBehavior(in
   close(fd);
   threadsOverrideEachOthersLocks =  d[0].result==0 && d[1].result==0;
 }
+#endif
 #endif /* SQLITE_UNIX_THREADS */
 
 /*
@@ -536,9 +538,11 @@ static int findLockInfo(
   key1.dev = statbuf.st_dev;
   key1.ino = statbuf.st_ino;
 #ifdef SQLITE_UNIX_THREADS
+#if SQLITE_THREAD_OVERRIDE_LOCK == -1
   if( threadsOverrideEachOthersLocks<0 ){
     testThreadLockingBehavior(fd);
   }
+#endif
   key1.tid = threadsOverrideEachOthersLocks ? 0 : pthread_self();
 #endif
   memset(&key2, 0, sizeof(key2));