summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--berkeleydb/db-4.7.25.NC-mingw32hack.patch11
-rw-r--r--berkeleydb/makefile.mk6
2 files changed, 17 insertions, 0 deletions
diff --git a/berkeleydb/db-4.7.25.NC-mingw32hack.patch b/berkeleydb/db-4.7.25.NC-mingw32hack.patch
new file mode 100644
index 000000000000..62137efb75b8
--- /dev/null
+++ b/berkeleydb/db-4.7.25.NC-mingw32hack.patch
@@ -0,0 +1,11 @@
+--- misc/db-4.7.25.NC/dist/configure 2012-03-30 00:25:17.456408946 +0200
++++ misc/build/db-4.7.25.NC/dist/configure 2012-03-30 00:24:44.344633205 +0200
+@@ -34776,7 +34776,7 @@
+ no | unknown) ;;
+ *)
+ cat >>confdefs.h <<_ACEOF
+-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
++#define _FILE_OFFSET_BITS 32
+ _ACEOF
+ ;;
+ esac
diff --git a/berkeleydb/makefile.mk b/berkeleydb/makefile.mk
index 082170c70c7f..6a5809ad7cc9 100644
--- a/berkeleydb/makefile.mk
+++ b/berkeleydb/makefile.mk
@@ -59,6 +59,12 @@ ADDITIONAL_FILES= \
# not needed for win32. comment out when causing problems...
.IF "$(GUI)$(COM)"=="WNTGCC"
PATCH_FILES=db-4.7.25-mingw.patch
+PATCH_FILES += db-4.7.25.NC-mingw32hack.patch
+ # otherwise, db-4.7.25.NC/dist/configure decides for _FILE_OFFSET_BITS=64,
+ # which causes /usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h to not
+ # define _USE_32BIT_TIME_T, so that berkeleydb uses a 64 bit time_t while
+ # the rest of LibreOffice uses a 32 bit time_t, which causes problems as
+ # there is e.g. a member time_t timestamp of struct __db in db.h
.ELSE
PATCH_FILES=\
db-4.7.25.patch \