diff options
Diffstat (limited to 'poky/meta/recipes-support/db')
-rw-r--r-- | poky/meta/recipes-support/db/db/0001-clock-Do-not-define-own-timespec.patch | 45 | ||||
-rw-r--r-- | poky/meta/recipes-support/db/db_5.3.28.bb | 7 |
2 files changed, 50 insertions, 2 deletions
diff --git a/poky/meta/recipes-support/db/db/0001-clock-Do-not-define-own-timespec.patch b/poky/meta/recipes-support/db/db/0001-clock-Do-not-define-own-timespec.patch new file mode 100644 index 0000000000..9d51a44a26 --- /dev/null +++ b/poky/meta/recipes-support/db/db/0001-clock-Do-not-define-own-timespec.patch @@ -0,0 +1,45 @@ +From 96b303caf70a7635953c36e5bfb9ad6e75cb7637 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 14 Feb 2020 14:12:59 -0800 +Subject: [PATCH] clock: Do not define own timespec + +timespec is provided by libc and its best left to libc +os_gettime takes a db_timespec and passed its address to clock_gettime +which assumes that db_timespec and timespec are same but actually +its 12-bytes here and libc has 16-bytes + +This can cause problems especially with 64bit time_t + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/dbinc/clock.h | 17 +---------------- + 1 file changed, 1 insertion(+), 16 deletions(-) + +--- a/src/dbinc/clock.h ++++ b/src/dbinc/clock.h +@@ -44,22 +44,8 @@ + extern "C" { + #endif + +-/* +- * This declaration is POSIX-compatible. Because there are lots of different +- * time.h include file patterns out there, it's easier to declare our own name +- * in all cases than to try and discover if a system has a struct timespec. +- * For the same reason, and because we'd have to #include <sys/time.h> in db.h, +- * we don't export any timespec structures in the DB API, even in places where +- * it would make sense, like the replication statistics information. +- */ +-typedef struct { +- time_t tv_sec; /* seconds */ +-#ifdef HAVE_MIXED_SIZE_ADDRESSING +- int32_t tv_nsec; +-#else +- long tv_nsec; /* nanoseconds */ +-#endif +-} db_timespec; ++#include <time.h> ++#define db_timespec struct timespec + + /* Operations on timespecs */ + #undef timespecclear diff --git a/poky/meta/recipes-support/db/db_5.3.28.bb b/poky/meta/recipes-support/db/db_5.3.28.bb index 761d80c2fd..3a0923ae36 100644 --- a/poky/meta/recipes-support/db/db_5.3.28.bb +++ b/poky/meta/recipes-support/db/db_5.3.28.bb @@ -10,7 +10,7 @@ # same system at the same time if really necessary. SECTION = "libs" SUMMARY = "Berkeley Database v5" -HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html" +HOMEPAGE = "https://www.oracle.com/database/technologies/related/berkeleydb.html" LICENSE = "Sleepycat" RCONFLICTS_${PN} = "db3" @@ -20,12 +20,13 @@ CVE_VERSION = "11.2.${PV}" PR = "r1" PE = "1" -SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" +SRC_URI = "https://download.oracle.com/berkeley-db/db-${PV}.tar.gz" SRC_URI += "file://fix-parallel-build.patch \ file://0001-atomic-Rename-local-__atomic_compare_exchange-to-avo.patch \ file://0001-configure-Add-explicit-tag-options-to-libtool-invoca.patch \ file://sequence-type.patch \ file://0001-Fix-libc-compatibility-by-renaming-atomic_init-API.patch \ + file://0001-clock-Do-not-define-own-timespec.patch \ " # We are not interested in official latest 6.x versions; # let's track what debian is using. @@ -60,7 +61,9 @@ DB5_CONFIG ?= "--enable-o_direct --disable-cryptography --disable-queue --disabl EXTRA_OECONF = "${DB5_CONFIG} --enable-shared --enable-cxx --with-sysroot STRIP=true" +PACKAGECONFIG ??= "" PACKAGECONFIG[verify] = "--enable-verify, --disable-verify" +PACKAGECONFIG[dbm] = "--enable-dbm,--disable-dbm," EXTRA_OEMAKE += "LIBTOOL='./${HOST_SYS}-libtool'" |