summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/sqlite/files/sqlite-3.7.4-utimes.patch')
-rw-r--r--dev-db/sqlite/files/sqlite-3.7.4-utimes.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-db/sqlite/files/sqlite-3.7.4-utimes.patch b/dev-db/sqlite/files/sqlite-3.7.4-utimes.patch
new file mode 100644
index 000000000000..ddfa0451326a
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.7.4-utimes.patch
@@ -0,0 +1,35 @@
+--- configure.ac
++++ configure.ac
+@@ -127,7 +127,7 @@
+ #########
+ # Figure out whether or not we have these functions
+ #
+-AC_CHECK_FUNCS([usleep fdatasync localtime_r gmtime_r localtime_s])
++AC_CHECK_FUNCS([usleep utimes fdatasync localtime_r gmtime_r localtime_s])
+
+ #########
+ # By default, we use the amalgamation (this may be changed below...)
+--- src/os_unix.c
++++ src/os_unix.c
+@@ -120,6 +120,9 @@
+ #include <sys/time.h>
+ #include <errno.h>
+ #include <sys/mman.h>
++#ifndef HAVE_UTIMES
++#include <utime.h>
++#endif
+
+ #if SQLITE_ENABLE_LOCKING_STYLE
+ # include <sys/ioctl.h>
+@@ -1608,7 +1611,11 @@
+ pFile->eFileLock = eFileLock;
+ #if !OS_VXWORKS
+ /* Always update the timestamp on the old file */
++#ifdef HAVE_UTIMES
+ utimes(zLockFile, NULL);
++#else
++ utime(zLockFile, NULL);
++#endif
+ #endif
+ return SQLITE_OK;
+ }