From 2a639572043dc39d057e2a80214ba47a76dcc3d2 Mon Sep 17 00:00:00 2001 From: "Randall S. Becker" Date: Mon, 1 Jun 2026 21:18:00 +0100 Subject: [PATCH] capsule: include `arpa/inet.h` for `ntohs()` declaration Some platforms require inclusion of arpa/inet.h in order to use ntohs(). Follow-up to e78b1b3eccfa6a2e367a1225ea1b66dafcdac3c4 #21153 Closes #21834 --- lib/capsule.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/capsule.c b/lib/capsule.c index 4f5d0e7e24..1ba0ccfb84 100644 --- a/lib/capsule.c +++ b/lib/capsule.c @@ -26,6 +26,10 @@ #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP) +#ifdef HAVE_ARPA_INET_H +#include /* for htons() */ +#endif + #include #include "urldata.h" #include "curlx/dynbuf.h"