Skip to content

Fix the hitch 1.8.0 build with GCC 15 and C23 - #372

Open
dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:hitch_c23
Open

dgarske wants to merge 1 commit into
wolfSSL:masterfrom
dgarske:hitch_c23

Conversation

@dgarske

@dgarske dgarske commented Nov 14, 2026

Copy link
Copy Markdown
Member

Description

hitch 1.8.0 fails to build with GCC 15 (Ubuntu 26.04, now ubuntu-latest), which breaks wolfSSL's hitch CI job; wolfSSL/wolfssl#12130 pinned that job to ubuntu-24.04 until this lands. The patch now also carries two fixes from hitch upstream that postdate the 1.8.0 release:

  • src/foreign/miniobj.h: ALLOC_OBJ passes calloc(1, sizeof *(to)), from varnish/hitch ad7262cc, for -Werror=calloc-transposed-args
  • src/hitch.c: the strchr() results in sni_match() and sni_lookup() are const char *, the same change as the open Fix -Wdiscarded-qualifiers errors in sni_match and sni_lookup varnish/hitch#404, for -Werror=discarded-qualifiers (under C23, glibc's strchr on a const char * returns const char *; the pointer is only read)

Both can be dropped from the patch once hitch releases them.

Testing

In an ubuntu:26.04 container (GCC 15.2) with wolfSSL built --enable-hitch: the current patch fails with the three errors seen in wolfSSL's hitch CI job; with this change hitch builds, links against wolfSSL and make check gives the same result as CI on ubuntu-24.04 (no failures, the same three tests skipped). The regenerated patch is otherwise identical to the current one.

Copilot AI balanced review requested due to automatic review settings November 14, 2026 00:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

There are no active review issues for the compiler-compatibility changes.

No open issues 🎉

What changed in this PR

Updates the hitch 1.8.0 wolfSSL integration patch to resolve GCC 15 and C23 build errors, supporting removal of the temporary CI pin to Ubuntu 24.04.

Changes:

  • Reorders calloc arguments in ALLOC_OBJ to avoid transposed-argument warnings.
  • Makes strchr result pointers const-correct in sni_match and sni_lookup.
File Description
hitch/​hitch_1.8.0.patch Adds compiler-compatibility fixes for allocation and SNI lookup code.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants