summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2026-03-18 16:17:23 -0700
committerKhem Raj <raj.khem@gmail.com>2026-03-18 16:18:31 -0700
commita68f03454b1b1097a4cb6930f3ccb3a3ca73954c (patch)
treea8531fb0f100f33c4977d0865d72c2b8c3d82b63
parenta75c2f0b6f9d10c116b3da7106234bce6c8c1a4f (diff)
downloadmeta-openembedded-a68f03454b1b1097a4cb6930f3ccb3a3ca73954c.tar.gz
libfaketime: Upgrade to 0.9.11
Fix build with glibc 2.43+ Changes: Fixed various cross-platform compile-time issues Honor nanosecond parameters/fields in relevant system calls Limited improvements to enhance compatibility with other LD_PRELOAD libraries Added selected more intercepted system calls Unset FAKETIME_SHARED automatically for child processes when enabling FAKETIME_FLSHM=1 Disable shared memory for child processes through FAKETIME_DISABLE_SHM=1 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-test/libfaketime/libfaketime/0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch34
-rw-r--r--meta-oe/recipes-test/libfaketime/libfaketime/0001-Makefile-Detect-compiler-in-makefile.patch45
-rw-r--r--meta-oe/recipes-test/libfaketime/libfaketime_0.9.11.bb (renamed from meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb)11
3 files changed, 40 insertions, 50 deletions
diff --git a/meta-oe/recipes-test/libfaketime/libfaketime/0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch b/meta-oe/recipes-test/libfaketime/libfaketime/0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch
new file mode 100644
index 0000000000..1696e7146e
--- /dev/null
+++ b/meta-oe/recipes-test/libfaketime/libfaketime/0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch
@@ -0,0 +1,34 @@
1From dbe865dfdba0145d993d70b7fd4ec88b2f47554b Mon Sep 17 00:00:00 2001
2From: Tomas Korbar <tkorbar@redhat.com>
3Date: Mon, 15 Dec 2025 11:03:21 +0100
4Subject: [PATCH] Add const qualifiers to fix build with ISO C23
5
6Fix https://github.com/wolfcw/libfaketime/issues/524
7
8Upstream-Status: Backport [https://github.com/wolfcw/libfaketime/pull/525]
9---
10 src/libfaketime.c | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/src/libfaketime.c b/src/libfaketime.c
14index ef1dca9..02839c8 100644
15--- a/src/libfaketime.c
16+++ b/src/libfaketime.c
17@@ -2666,7 +2666,7 @@ int timespec_get(struct timespec *ts, int base)
18 static void parse_ft_string(const char *user_faked_time)
19 {
20 struct tm user_faked_time_tm;
21- char * tmp_time_fmt;
22+ const char * tmp_time_fmt;
23 char * nstime_str;
24
25 if (!strncmp(user_faked_time, user_faked_time_saved, BUFFERLEN))
26@@ -3338,7 +3338,7 @@ static void prepare_config_contents(char *contents)
27 bool str_array_contains(const char *haystack, const char *needle)
28 {
29 size_t needle_len = strlen(needle);
30- char *pos = strstr(haystack, needle);
31+ const char *pos = strstr(haystack, needle);
32 while (pos) {
33 if (pos == haystack || *(pos - 1) == ',') {
34 char nextc = *(pos + needle_len);
diff --git a/meta-oe/recipes-test/libfaketime/libfaketime/0001-Makefile-Detect-compiler-in-makefile.patch b/meta-oe/recipes-test/libfaketime/libfaketime/0001-Makefile-Detect-compiler-in-makefile.patch
deleted file mode 100644
index ff04837652..0000000000
--- a/meta-oe/recipes-test/libfaketime/libfaketime/0001-Makefile-Detect-compiler-in-makefile.patch
+++ /dev/null
@@ -1,45 +0,0 @@
1From 735bb5d053efad274aa4ea5a6682e656ff792909 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 24 Aug 2023 01:49:48 -0700
4Subject: [PATCH] Makefile: Detect compiler in makefile
5
6Add compiler specific options based on detected compiler gcc/clang
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 src/Makefile | 18 +++++++++++++++++-
12 1 file changed, 17 insertions(+), 1 deletion(-)
13
14diff --git a/src/Makefile b/src/Makefile
15index 62e924c..c15eb33 100644
16--- a/src/Makefile
17+++ b/src/Makefile
18@@ -110,7 +110,23 @@ PREFIX ?= /usr/local
19 LIBDIRNAME ?= /lib/faketime
20 PLATFORM ?=$(shell uname)
21
22-CFLAGS += -std=gnu99 -Wall -Wextra -Werror -Wno-nonnull-compare -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS)
23+ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1)
24+COMPILER := clang
25+else
26+COMPILER := gcc
27+endif
28+export COMPILER
29+
30+CFLAGS += -std=gnu99 -Wall -Wextra -Werror -DFAKE_PTHREAD -DFAKE_STAT -DFAKE_UTIME -DFAKE_SLEEP -DFAKE_TIMERS -DFAKE_INTERNAL_CALLS -fPIC -DPREFIX='"'$(PREFIX)'"' -DLIBDIRNAME='"'$(LIBDIRNAME)'"' $(FAKETIME_COMPILE_CFLAGS)
31+
32+ifeq ($(COMPILER),clang)
33+CFLAGS += -Wno-tautological-pointer-compare
34+endif
35+
36+ifeq ($(COMPILER),gcc)
37+CFLAGS += -Wno-nonnull-compare
38+endif
39+
40 ifeq ($(PLATFORM),SunOS)
41 CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
42 endif
43--
442.42.0
45
diff --git a/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.11.bb
index 3588e96847..55a4cabe81 100644
--- a/meta-oe/recipes-test/libfaketime/libfaketime_0.9.10.bb
+++ b/meta-oe/recipes-test/libfaketime/libfaketime_0.9.11.bb
@@ -3,19 +3,20 @@ SECTION = "libs"
3LICENSE = "GPL-2.0-only" 3LICENSE = "GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 4LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
5 5
6SRCREV = "d475b925943ad404c6c728ac868dc73949e7281c" 6SRCREV = "6714b98794a9e8a413bf90d2927abf5d888ada99"
7
8SRC_URI = "git://github.com/wolfcw/libfaketime.git;branch=master;protocol=https \
9 file://0001-Makefile-Detect-compiler-in-makefile.patch \
10 "
11 7
8SRC_URI = "git://github.com/wolfcw/libfaketime.git;branch=master;tag=v${PV};protocol=https \
9 file://0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch \
10"
12 11
13CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" 12CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE"
14 13
15do_configure[noexec] = "1" 14do_configure[noexec] = "1"
15
16do_compile () { 16do_compile () {
17 oe_runmake 17 oe_runmake
18} 18}
19
19do_install () { 20do_install () {
20 install -d ${D}${libdir}/faketime 21 install -d ${D}${libdir}/faketime
21 oe_libinstall -C src libfaketime ${D}${libdir}/faketime 22 oe_libinstall -C src libfaketime ${D}${libdir}/faketime