From cb96d9c8e239dc748a859cf117fe844c1cba34b5 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Tue, 29 Jul 2025 12:21:37 +0200 Subject: [PATCH] Import isc/list.h after cmocka to avoid redefinition errors In file included from diff_test.c:25: /usr/local/include/cmocka.h:2333:1: error: unknown attribute '_Noreturn' ignored [-Werror,-Wunknown-attributes] 2333 | CMOCKA_NORETURN void _fail(const char * const file, const int line); | ^~~~~~~~~~~~~~~ /usr/local/include/cmocka.h:129:41: note: expanded from macro 'CMOCKA_NORETURN' 129 | #define CMOCKA_NORETURN __attribute__ ((noreturn)) | ^~~~~~~~ /usr/include/stdnoreturn.h:36:19: note: expanded from macro 'noreturn' 36 | #define noreturn _Noreturn | ^~~~~~~~~ --- tests/dns/diff_test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/dns/diff_test.c b/tests/dns/diff_test.c index 66d6d9b015..ea7785db29 100644 --- a/tests/dns/diff_test.c +++ b/tests/dns/diff_test.c @@ -19,13 +19,14 @@ #include #include -#include "isc/list.h" - #define UNIT_TESTING #include #include +/* isc/list.h must be imported after cmocka to avoid redefinition errors */ +#include + #include unsigned char data_1[] = "\006name_1";