diff options
Diffstat (limited to 'externals')
-rw-r--r-- | externals/Makefile.am | 3 | ||||
-rw-r--r-- | externals/bdb-cygwin.patch | 21 |
2 files changed, 23 insertions, 1 deletions
diff --git a/externals/Makefile.am b/externals/Makefile.am index 32357d20669c..467fd9e8f287 100644 --- a/externals/Makefile.am +++ b/externals/Makefile.am @@ -11,6 +11,7 @@ $(DB).tar.gz: $(DB): $(DB).tar.gz gunzip < $(srcdir)/$(DB).tar.gz | tar xvf - + cd $(DB) && patch -p1 < $(srcdir)/bdb-cygwin.patch have-db: $(MAKE) $(DB) @@ -100,7 +101,7 @@ endif all: build-db build-aterm build-bzip2 -EXTRA_DIST = $(DB).tar.gz $(ATERM).tar.gz $(BZIP2).tar.gz +EXTRA_DIST = $(DB).tar.gz $(ATERM).tar.gz $(BZIP2).tar.gz bdb-cygwin.patch ext-clean: $(RM) -f have-db build-db have-aterm build-aterm 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; |