On 1/7/26 10:58, Christos Zoulas wrote:
On 2026-01-07 12:58 pm, Paul Eggert wrote:
Also, that code appears on line 994 in upstream tzcode, whereas your
diagnostic says line 1017. So I suppose you're using a modified
private.h? The upstream private.h contains this:

Yes, it is slightly modified, but not in a way to affect this.

I looked at NetBSD trunk on GitHub, and I think I see the problem. NetBSD's copy of localtime.c differs from upstream by including <assert.h>, for no reason.

To fix the problem, remove that "#include <assert.h>" line. That line was added to NetBSD's lib/libc/time/localtime.c in 2013 (commit 33d9f9e08d3535053feb424293a0e5a0f9b39650) for reasons that are no longer relevant (a _DIAGASSERT was added then but is no longer present).

The problem is that the static_assert macro is defined for pre-2023 compilers.

Yes, but on those platforms the static_assert macro is defined only by <assert.h>, as per the relevant ISO C and POSIX standards. Since tzcode never includes <assert.h> it should not run into the problem.

Reply via email to