From ccf5c922ee2f456a716bb8abd526c1758e57f1ed Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Fri, 31 Jul 2026 00:38:31 +0200 Subject: [PATCH] =?UTF-8?q?fix(core/abi):=20report=5Fphase=20joins=20its?= =?UTF-8?q?=20siblings=20behind=20the=20quic=20cfg=20=E2=80=94=20the=20C?= =?UTF-8?q?=20header=20parses=20again?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new punktfunk_connection_report_phase lacked the #[cfg(feature = "quic")] its connection-fn siblings carry, so cbindgen emitted it OUTSIDE the guarded region that declares the opaque PunktfunkConnection — the generated header stopped compiling as C (CI's harness caught it; my local harness failure was a pre-existing macOS linker issue that masked this distinct cause — full-suite comparison attributed the wrong root). Verified: the harness compiles and passes in the amd64 CI-image container. Co-Authored-By: Claude Fable 5 --- crates/punktfunk-core/src/abi.rs | 1 + include/punktfunk_core.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/crates/punktfunk-core/src/abi.rs b/crates/punktfunk-core/src/abi.rs index 1b656ad7..01211429 100644 --- a/crates/punktfunk-core/src/abi.rs +++ b/crates/punktfunk-core/src/abi.rs @@ -4021,6 +4021,7 @@ pub unsafe extern "C" fn punktfunk_connection_report_decode_us( /// # Safety /// `c` is an opaque handle from a `*_new`/`*_pair` the caller has not yet freed, or null (an /// error, not UB). +#[cfg(feature = "quic")] #[no_mangle] pub unsafe extern "C" fn punktfunk_connection_report_phase( c: *const PunktfunkConnection, diff --git a/include/punktfunk_core.h b/include/punktfunk_core.h index 37fd490c..ff9dfa9e 100644 --- a/include/punktfunk_core.h +++ b/include/punktfunk_core.h @@ -2783,6 +2783,7 @@ PunktfunkStatus punktfunk_connection_report_decode_us(const PunktfunkConnection uint32_t us); #endif +#if defined(PUNKTFUNK_FEATURE_QUIC) // Report this client's display-latch grid so the host can phase-lock its capture tick // (design/phase-locked-capture.md). `next_latch_host_ns` must already be host clock — convert // with the connection's clock offset (`T_host = T_client + offset`). Fire-and-forget; call ~1 Hz @@ -2796,6 +2797,7 @@ PunktfunkStatus punktfunk_connection_report_phase(const PunktfunkConnection *c, uint32_t latch_period_ns, uint32_t uncertainty_ns, uint32_t arrival_lead_ns); +#endif #if defined(PUNKTFUNK_FEATURE_QUIC) // Whether [`punktfunk_connection_report_decode_us`] is worth calling this session: writes 1 to