Skip to content

Commit c835e01

Browse files
zandbeltclaude
andcommitted
test/fuzz: include util.h before json.h in fuzz_metadata
json.h includes httpd.h directly, so with the includes sorted alphabetically Apache's empty PACKAGE_* defines from ap_config_auto.h land before config.h's real ones and the redefinition trips -Werror in the CI build job's warning flags (the local default configure carries no -Werror, which is how it slipped through). Same race and same clang-format guard as fuzz_cookie.c, which documents it for http.h. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent d642055 commit c835e01

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎test/fuzz/fuzz_metadata.c‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,17 @@
1919
*/
2020

2121
#include "fuzz.h"
22+
/* util.h pulls in const.h before any Apache header does, so config.h's
23+
* PACKAGE_* defines win the race against Apache's own (empty) ones in
24+
* ap_config_auto.h -- json.h includes httpd.h directly; keep util.h ahead
25+
* of it, see cfg/cfg.h's own ordering (clang-format's include sorting
26+
* would undo exactly that, hence the guard) */
27+
/* clang-format off */
28+
#include "util.h" /* test fixture */
2229
#include "json.h"
2330
#include "metadata.h"
24-
#include "util.h" /* test fixture */
2531
#include "util/util.h" /* oidc_json_decode_object */
32+
/* clang-format on */
2633

2734
#include <apr_pools.h>
2835
#include <apr_strings.h>

0 commit comments

Comments
 (0)