Skip to contentSkip to conversation

package/faketime: rebase patch on v0.9.10

PATCH Applied Thomas Bonnefille via buildroot 1 participant 2 messages Apr 2 – Apr 3

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/faketime: rebase patch on v0.9.10

As of glibc 2.43, faketime build was broken in buildroot because of a missing const qualifier. A patch was applied to it in master to fix this issue.
Sadly, due to a difference in faketime version between master (v0.9.12) and 2025.02.x (v0.9.10), the patch didn't apply properly in 2025.02.x.

Rebase the faketime patch on v0.9.10.
Fixes:
https://autobuild.buildroot.org/results/761/761250e8cbb2602abdc7752d182a44b6f7de5e11

---
 ...onst-qualifiers-to-fix-build-with-ISO-C23.patch | 23 ++++++++--------------
 1 file changed, 8 insertions(+), 15 deletions(-)
package/faketime/0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch +8 -15
index ce84d40699..c889dfae29 100644
@@ -1,4 +1,4 @@
-From dbe865dfdba0145d993d70b7fd4ec88b2f47554b Mon Sep 17 00:00:00 2001
+From 1f4f260977a7fcd09fb71b83ee64c4d87b868441 Mon Sep 17 00:00:00 2001
 From: Tomas Korbar <[email protected]>
 Date: Mon, 15 Dec 2025 11:03:21 +0100
 Subject: [PATCH] Add const qualifiers to fix build with ISO C23
@@ -8,15 +8,17 @@ Fix https://github.com/wolfcw/libfaketime/issues/524
 Upstream: https://github.com/wolfcw/libfaketime/commit/dbe865dfdba0145d993d70b7fd4ec88b2f47554b
 
 Signed-off-by: Bernd Kuhls <[email protected]>
+[Thomas: Rebased for version v0.9.10]
+Signed-off-by: Thomas Bonnefille <[email protected]>
 ---
- src/libfaketime.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ src/libfaketime.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/libfaketime.c b/src/libfaketime.c
-index ef1dca9..02839c8 100644
+index e632395..955cf3c 100644
 --- a/src/libfaketime.c
 +++ b/src/libfaketime.c
-@@ -2666,7 +2666,7 @@ int timespec_get(struct timespec *ts, int base)
+@@ -2365,7 +2365,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;
@@ -25,15 +27,6 @@ index ef1dca9..02839c8 100644
    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);
 -- 
-2.47.3
+2.53.0
 

---
base-commit: 894ab931e1edcb2171e6c09c8efc70dd546ab52e
change-id: 20260403-fix_faketime-2b9ddfbe192e

Best regards,

Signature · 6 lines
Thomas Bonnefille <[email protected]>

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

In reply of:

Quoted 11 lines

As of glibc 2.43, faketime build was broken in buildroot because of a missing const qualifier. A patch was applied to it in master to fix this issue.
Sadly, due to a difference in faketime version between master (v0.9.12) and 2025.02.x (v0.9.10), the patch didn't apply properly in 2025.02.x.

Rebase the faketime patch on v0.9.10.
Fixes:
https://autobuild.buildroot.org/results/761/761250e8cbb2602abdc7752d182a44b6f7de5e11

Applied to 2025.02.x. Thanks

Quoted 58 lines
---
 ...onst-qualifiers-to-fix-build-with-ISO-C23.patch | 23 ++++++++--------------
 1 file changed, 8 insertions(+), 15 deletions(-)
package/faketime/0001-Add-const-qualifiers-to-fix-build-with-ISO-C23.patch +8 -16
index ce84d40699..c889dfae29 100644
@@ -1,4 +1,4 @@
-From dbe865dfdba0145d993d70b7fd4ec88b2f47554b Mon Sep 17 00:00:00 2001
+From 1f4f260977a7fcd09fb71b83ee64c4d87b868441 Mon Sep 17 00:00:00 2001
 From: Tomas Korbar <[email protected]>
 Date: Mon, 15 Dec 2025 11:03:21 +0100
 Subject: [PATCH] Add const qualifiers to fix build with ISO C23
@@ -8,15 +8,17 @@ Fix https://github.com/wolfcw/libfaketime/issues/524
 Upstream: https://github.com/wolfcw/libfaketime/commit/dbe865dfdba0145d993d70b7fd4ec88b2f47554b
 
 Signed-off-by: Bernd Kuhls <[email protected]>
+[Thomas: Rebased for version v0.9.10]
+Signed-off-by: Thomas Bonnefille <[email protected]>
 ---
- src/libfaketime.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ src/libfaketime.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/libfaketime.c b/src/libfaketime.c
-index ef1dca9..02839c8 100644
+index e632395..955cf3c 100644
 --- a/src/libfaketime.c
 +++ b/src/libfaketime.c
-@@ -2666,7 +2666,7 @@ int timespec_get(struct timespec *ts, int base)
+@@ -2365,7 +2365,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;
@@ -25,15 +27,6 @@ index ef1dca9..02839c8 100644
    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);
 -- 
-2.47.3
+2.53.0
 
 
---

base-commit: 894ab931e1edcb2171e6c09c8efc70dd546ab52e
change-id: 20260403-fix_faketime-2b9ddfbe192e

Quoted 8 lines

Best regards,

Signature · 6 lines
Thomas Bonnefille <[email protected]>

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot