summaryrefslogtreecommitdiff
path: root/system/db/time64.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-01 21:12:10 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-01 21:12:10 +0000
commit0da94e6962c19e4f0835622bce5082ab4343711b (patch)
treec81dcb269a176726f4eb131e1109659db7de1b0e /system/db/time64.patch
parent41e767490df726ff68e82922bb771b63e603cf5c (diff)
downloadpackages-0da94e6962c19e4f0835622bce5082ab4343711b.tar.gz
packages-0da94e6962c19e4f0835622bce5082ab4343711b.tar.bz2
packages-0da94e6962c19e4f0835622bce5082ab4343711b.tar.xz
packages-0da94e6962c19e4f0835622bce5082ab4343711b.zip
system/db: Fix runtime crash with 64-bit time_t
Diffstat (limited to 'system/db/time64.patch')
-rw-r--r--system/db/time64.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/system/db/time64.patch b/system/db/time64.patch
new file mode 100644
index 000000000..12ef0508a
--- /dev/null
+++ b/system/db/time64.patch
@@ -0,0 +1,18 @@
+By the comment's own admission, this cannot affect on-disk nor ABI because
+'long' varies per architecture. So, this change is always correct.
+
+--- db-5.3.28/src/dbinc/clock.h.old 2013-09-09 15:35:08.000000000 +0000
++++ db-5.3.28/src/dbinc/clock.h 2020-01-31 19:22:11.630000000 +0000
+@@ -54,11 +54,7 @@
+ */
+ typedef struct {
+ time_t tv_sec; /* seconds */
+-#ifdef HAVE_MIXED_SIZE_ADDRESSING
+- int32_t tv_nsec;
+-#else
+- long tv_nsec; /* nanoseconds */
+-#endif
++ time_t tv_nsec; /* nanoseconds */
+ } db_timespec;
+
+ /* Operations on timespecs */