about summary refs log tree commit diff
path: root/externals/bdb-cygwin.patch
diff options
context:
space:
mode:
authorRob Vermaas <rob.vermaas@gmail.com>2006-06-07T15·27+0000
committerRob Vermaas <rob.vermaas@gmail.com>2006-06-07T15·27+0000
commit370af25efff8be8582bb810c9e4d980989668ffb (patch)
tree0129922ac65d69dad9d19618cacd20a856c699d6 /externals/bdb-cygwin.patch
parent23960e92df736d3c87db861fcaf2dd7981cfc4ad (diff)
* Fix for a locking bug in Berkeley DB on Cygwin.
Diffstat (limited to 'externals/bdb-cygwin.patch')
-rw-r--r--externals/bdb-cygwin.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/externals/bdb-cygwin.patch b/externals/bdb-cygwin.patch
new file mode 100644
index 000000000000..3f9d658b5dac
--- /dev/null
+++ b/externals/bdb-cygwin.patch
@@ -0,0 +1,21 @@
+diff -rc db-4.4.20.NC-old/os/os_flock.c db-4.4.20.NC/os/os_flock.c
+*** db-4.4.20.NC-old/os/os_flock.c	Mon Jun 20 16:59:01 2005
+--- db-4.4.20.NC/os/os_flock.c	Wed Jun  7 17:01:49 2006
+***************
+*** 36,41 ****
+--- 36,50 ----
+  
+  	DB_ASSERT(F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1);
+  
++ #ifdef __CYGWIN__
++ 	/*
++ 	 * Windows file locking interferes with read/write operations, so we
++ 	 * map the ranges to an area past the end of the file.
++ 	 */
++ 	DB_ASSERT(offset < (off_t) 1 << 62);
++ 	offset += (off_t) 1 << 62;
++ #endif
++ 
+  #ifdef HAVE_FCNTL
+  	fl.l_start = offset;
+  	fl.l_len = 1;