← Back to Pull requests

httptunnel: fix C23 prototypes on musl #31518

Open
hauke opened this pull request with 80 lines diff across 3 files
View on GitHub
hauke hauke commented on Nov 29, 2026 17:49 UTC
Author

📦 Package Details

Maintainer: @utoni

Description:

Fix the bundled getenv and getopt prototypes for GCC 15 on musl. Give the non-debug logging stubs the same variadic prototypes as their callers expect.

Related source or failure log

Build-tested only: OpenWrt snapshot SDK r38597-088e490be1 on armsr/armv8 (aarch64_generic, GCC 15.3.0, musl 1.2.6). Targeted goal package/feeds/packages/httptunnel/compile with make -j17 IGNORE_ERRORS=m V=s. The post-review target build produced httptunnel-3.3-r2.apk. A follow-up with the in-tree toolchain on the same target also generated httptunnel-3.3-r2.apk.

LLM assistance was used for the investigation, patch preparation or refresh, and draft wording.

---

🔬 Run Testing Details

No runtime test performed.

---

✅ Formalities

  • I have reviewed the contributing guidelines.

  • I have reviewed the AI policy.

  • - [x] I have used AI or LLM in my pull request, description, or commit
    messages, and the description says what it was used for.

    If your PR contains a patch:

  • It can be applied using git am

  • It has been refreshed to avoid offsets, fuzzes, etc.

  • - [x] It is structured in a way that it is potentially upstreamable

    Diff: 80 lines (+79 / -1) across 3 files Reviewer: openwrt-ai Review duration: 3507m
    All Vouch review confidence checks passed
    Residual risk 0.04 = Change Risk (0.37) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 80 lines diff across 3 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.86 · 2 substantive comment(s)
    0.86
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    89%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.263
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    4 items
    openwrt-ai openwrt-ai commented on code on Nov 29, 2026 18:54 UTC
    Code Review
    net/httptunnel/patches/010-fix-bundled-getopt-prototypes.patch:1
    @@ -0,0 +1,55 @@
    +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
    +From: Hauke Mehrtens <hauke@hauke-m.de>
    +Date: Sat, 28 Nov 2026 03:53:51 +0100
    +Subject: [PATCH] port: fix bundled getopt prototypes on C23
    +
    +On musl the empty parameter lists for getopt and getenv conflict
    +with calls that take arguments under C23. Declare the real getopt
    +signature and use the standard header for getenv.
    +

    nit: neither this patch nor 020 says where it stands upstream, and the code is unchanged on upstream master (common.h:56-58). Consider sending both to larsbrinkhoff/httptunnel and adding the PR link (or a "not submitted" note) to the descriptions. Optional, not blocking.

    ---
    _Generated by Claude Code_

    openwrt-ai openwrt-ai commented on Nov 29, 2026 18:54 UTC
    Reviewer

    Reviewed 1 new commits; no blocking issues found.

    ---
    _Generated by Claude Code_

    hauke hauke commented on code on Dec 01, 2026 22:55 UTC
    Code Review
    net/httptunnel/patches/010-fix-bundled-getopt-prototypes.patch:1
    @@ -0,0 +1,55 @@
    +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
    +From: Hauke Mehrtens <hauke@hauke-m.de>
    +Date: Sat, 28 Nov 2026 03:53:51 +0100
    +Subject: [PATCH] port: fix bundled getopt prototypes on C23
    +
    +On musl the empty parameter lists for getopt and getenv conflict
    +with calls that take arguments under C23. Declare the real getopt
    +signature and use the standard header for getenv.
    +

    Downstream only, I am too lazy to send this upstream.

    Reviewers
    Assignees
    hauke hauke
    Labels
    risk: low confidence: 89.4% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37.2% (MEDIUM) · Higher = larger blast radius
    37.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 89.4% · Lower = rushed or shallow review
    89.4%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 3.9% · Safe to merge
    3.9%