1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-18 19:26:02 +00:00
nixpkgs/pkgs/development/libraries/db/cygwin-4.4.patch
William A. Kennington III 99f5d2edb4 db: Reorganize Berkeley Database Packaging
Currently, the berkeley databases resuses a lot of the same code for the
expressions of each version. This consolidates all of the build routines
similar to that of the linux kernel.

This patch also adds version 6 of BDB.
2014-02-15 12:03:01 +01:00

22 lines
600 B
Diff

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;