A backwards-incompatible change was made in Gnulib yesterday:
Date Modules Changes
2025-10-31 nstrftime The return type changed from size_t to ptrdiff_t.
The return value in case of failure changed from 0
to -1.
GNU diffutils needs to be updated accordingly. Find attached a proposed
patch. So that the value -1 gets interpreted as failure, not as success
of nstrftime().
Bruno
>From a72aef7d5141aada87eb3ef27a1bd2e3925d7284 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Sat, 1 Nov 2025 09:58:35 +0100
Subject: [PATCH] maint: Update after gnulib changed
* src/context.c (print_context_label): Update for changed return value
convention of nstrftime.
---
src/context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/context.c b/src/context.c
index 2687ad8..156a191 100644
--- a/src/context.c
+++ b/src/context.c
@@ -72,7 +72,7 @@ print_context_label (char const *mark,
struct tm const *tm = localtime (&ts.tv_sec);
int nsec = ts.tv_nsec;
- if (tm && nstrftime (buf, sizeof buf, time_format, tm, localtz, nsec))
+ if (tm && nstrftime (buf, sizeof buf, time_format, tm, localtz, nsec) > 0)
fprintf (outfile, "%s %s\t%s", mark, name, buf);
else if (TYPE_SIGNED (time_t))
{
--
2.51.0