From c293f728461a6514eba8fd648645a01c921b6191 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 3 Mar 2024 22:41:25 +0100 Subject: [PATCH] [httpd] Fix for musl libc not having sys/queue.c (closes #1726) --- src/httpd_libevhttp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/httpd_libevhttp.c b/src/httpd_libevhttp.c index b95b5737..a932bc9b 100644 --- a/src/httpd_libevhttp.c +++ b/src/httpd_libevhttp.c @@ -23,7 +23,6 @@ #include #include #include -#include // TAILQ_FOREACH #include // listen() #include @@ -105,7 +104,8 @@ httpd_query_iterate(httpd_query *query, httpd_query_iteratecb cb, void *arg) { struct evkeyval *param; - TAILQ_FOREACH(param, query, next) + // musl libc doesn't have sys/queue.h so don't use TAILQ_FOREACH + for (param = query->tqh_first; param; param = param->next.tqe_next) { cb(param->key, param->value, arg); }