mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
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>
This commit is contained in:
parent
a75c2f0b6f
commit
a68f03454b
@ -0,0 +1,34 @@
|
||||
From dbe865dfdba0145d993d70b7fd4ec88b2f47554b Mon Sep 17 00:00:00 2001
|
||||
From: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Mon, 15 Dec 2025 11:03:21 +0100
|
||||
Subject: [PATCH] Add const qualifiers to fix build with ISO C23
|
||||
|
||||
Fix https://github.com/wolfcw/libfaketime/issues/524
|
||||
|
||||
Upstream-Status: Backport [https://github.com/wolfcw/libfaketime/pull/525]
|
||||
---
|
||||
src/libfaketime.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/libfaketime.c b/src/libfaketime.c
|
||||
index ef1dca9..02839c8 100644
|
||||
--- a/src/libfaketime.c
|
||||
+++ b/src/libfaketime.c
|
||||
@@ -2666,7 +2666,7 @@ int timespec_get(struct timespec *ts, int base)
|
||||
static void parse_ft_string(const char *user_faked_time)
|
||||
{
|
||||
struct tm user_faked_time_tm;
|
||||
- char * tmp_time_fmt;
|
||||
+ const char * tmp_time_fmt;
|
||||
char * nstime_str;
|
||||
|
||||
if (!strncmp(user_faked_time, user_faked_time_saved, BUFFERLEN))
|
||||
@@ -3338,7 +3338,7 @@ static void prepare_config_contents(char *contents)
|
||||
bool str_array_contains(const char *haystack, const char *needle)
|
||||
{
|
||||
size_t needle_len = strlen(needle);
|
||||
- char *pos = strstr(haystack, needle);
|
||||
+ const char *pos = strstr(haystack, needle);
|
||||
while (pos) {
|
||||
if (pos == haystack || *(pos - 1) == ',') {
|
||||
char nextc = *(pos + needle_len);
|
||||
@ -1,45 +0,0 @@
|
||||
From 735bb5d053efad274aa4ea5a6682e656ff792909 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 24 Aug 2023 01:49:48 -0700
|
||||
Subject: [PATCH] Makefile: Detect compiler in makefile
|
||||
|
||||
Add compiler specific options based on detected compiler gcc/clang
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/Makefile | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 62e924c..c15eb33 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -110,7 +110,23 @@ PREFIX ?= /usr/local
|
||||
LIBDIRNAME ?= /lib/faketime
|
||||
PLATFORM ?=$(shell uname)
|
||||
|
||||
-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)
|
||||
+ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1)
|
||||
+COMPILER := clang
|
||||
+else
|
||||
+COMPILER := gcc
|
||||
+endif
|
||||
+export COMPILER
|
||||
+
|
||||
+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)
|
||||
+
|
||||
+ifeq ($(COMPILER),clang)
|
||||
+CFLAGS += -Wno-tautological-pointer-compare
|
||||
+endif
|
||||
+
|
||||
+ifeq ($(COMPILER),gcc)
|
||||
+CFLAGS += -Wno-nonnull-compare
|
||||
+endif
|
||||
+
|
||||
ifeq ($(PLATFORM),SunOS)
|
||||
CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
|
||||
endif
|
||||
--
|
||||
2.42.0
|
||||
|
||||
@ -3,19 +3,20 @@ SECTION = "libs"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
SRCREV = "d475b925943ad404c6c728ac868dc73949e7281c"
|
||||
|
||||
SRC_URI = "git://github.com/wolfcw/libfaketime.git;branch=master;protocol=https \
|
||||
file://0001-Makefile-Detect-compiler-in-makefile.patch \
|
||||
"
|
||||
SRCREV = "6714b98794a9e8a413bf90d2927abf5d888ada99"
|
||||
|
||||
SRC_URI = "git://github.com/wolfcw/libfaketime.git;branch=master;tag=v${PV};protocol=https \
|
||||
file://0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch \
|
||||
"
|
||||
|
||||
CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE"
|
||||
|
||||
do_configure[noexec] = "1"
|
||||
|
||||
do_compile () {
|
||||
oe_runmake
|
||||
}
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${libdir}/faketime
|
||||
oe_libinstall -C src libfaketime ${D}${libdir}/faketime
|
||||
Loading…
x
Reference in New Issue
Block a user