]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Include <sched.h> where necessary for musl libc
authorMichał Kępień <michal@isc.org>
Tue, 30 Jul 2019 19:08:40 +0000 (21:08 +0200)
committerMichał Kępień <michal@isc.org>
Tue, 30 Jul 2019 19:25:30 +0000 (21:25 +0200)
All unit tests define the UNIT_TESTING macro, which causes <cmocka.h> to
replace malloc(), calloc(), realloc(), and free() with its own functions
tracking memory allocations.  In order for this not to break
compilation, the system header declaring the prototypes for these
standard functions must be included before <cmocka.h>.

Normally, these prototypes are only present in <stdlib.h>, so we make
sure it is included before <cmocka.h>.  However, musl libc also defines
the prototypes for calloc() and free() in <sched.h>, which is included
by <pthread.h>, which is included e.g. by <isc/mutex.h>.  Thus, unit
tests including "dnstest.h" (which includes <isc/mem.h>, which includes
<isc/mutex.h>) after <cmocka.h> will not compile with musl libc as for
these programs, <sched.h> will be included after <cmocka.h>.

Always including <cmocka.h> after all other header files is not a
feasible solution as that causes the mock assertion macros defined in
<isc/util.h> to mangle the contents of <cmocka.h>, thus breaking
compilation.  We cannot really use the __noreturn__ or analyzer_noreturn
attributes with cmocka assertion functions because they do return if the
tested condition is true.  The problem is that what BIND unit tests do
is incompatible with Clang Static Analyzer's assumptions: since we use
cmocka, our custom assertion handlers are present in a shared library
(i.e. it is the cmocka library that checks the assertion condition, not
a macro in unit test code).  Redefining cmocka's assertion macros in
<isc/util.h> is an ugly hack to overcome that problem - unfortunately,
this is the only way we can think of to make Clang Static Analyzer
properly process unit test code.  Giving up on Clang Static Analyzer
being able to properly process unit test code is not a satisfactory
solution.

Undefining _GNU_SOURCE for unit test code could work around the problem
(musl libc's <sched.h> only defines the prototypes for calloc() and
free() when _GNU_SOURCE is defined), but doing that could introduce
discrepancies for unit tests including entire *.c files, so it is also
not a good solution.

All in all, including <sched.h> before <cmocka.h> for all affected unit
tests seems to be the most benign way of working around this musl libc
quirk.  While quite an ugly solution, it achieves our goals here, which
are to keep the benefit of proper static analysis of unit test code and
to fix compilation against musl libc.

(cherry picked from commit 59528d0e9d2ff5a9ed839e45272007bac73e64c4)

57 files changed:
lib/dns/tests/acl_test.c
lib/dns/tests/db_test.c
lib/dns/tests/dbdiff_test.c
lib/dns/tests/dbiterator_test.c
lib/dns/tests/dbversion_test.c
lib/dns/tests/dh_test.c
lib/dns/tests/dispatch_test.c
lib/dns/tests/dnstap_test.c
lib/dns/tests/dnstest.c
lib/dns/tests/dst_test.c
lib/dns/tests/geoip_test.c
lib/dns/tests/keytable_test.c
lib/dns/tests/master_test.c
lib/dns/tests/name_test.c
lib/dns/tests/nsec3_test.c
lib/dns/tests/peer_test.c
lib/dns/tests/private_test.c
lib/dns/tests/rbt_serialize_test.c
lib/dns/tests/rbt_test.c
lib/dns/tests/rdata_test.c
lib/dns/tests/rdataset_test.c
lib/dns/tests/rdatasetstats_test.c
lib/dns/tests/resolver_test.c
lib/dns/tests/rsa_test.c
lib/dns/tests/sigs_test.c
lib/dns/tests/time_test.c
lib/dns/tests/tkey_test.c
lib/dns/tests/tsig_test.c
lib/dns/tests/update_test.c
lib/dns/tests/zonemgr_test.c
lib/dns/tests/zt_test.c
lib/irs/tests/resconf_test.c
lib/isc/tests/buffer_test.c
lib/isc/tests/counter_test.c
lib/isc/tests/heap_test.c
lib/isc/tests/hmac_test.c
lib/isc/tests/ht_test.c
lib/isc/tests/lex_test.c
lib/isc/tests/mem_test.c
lib/isc/tests/parse_test.c
lib/isc/tests/pool_test.c
lib/isc/tests/queue_test.c
lib/isc/tests/radix_test.c
lib/isc/tests/random_test.c
lib/isc/tests/safe_test.c
lib/isc/tests/sockaddr_test.c
lib/isc/tests/socket_test.c
lib/isc/tests/symtab_test.c
lib/isc/tests/task_test.c
lib/isc/tests/taskpool_test.c
lib/isc/tests/time_test.c
lib/isc/tests/timer_test.c
lib/isccfg/tests/parser_test.c
lib/ns/tests/listenlist_test.c
lib/ns/tests/notify_test.c
lib/ns/tests/plugin_test.c
lib/ns/tests/query_test.c

index f2e4e7282b140b74b01cce190ac5342476525e45..a2b7f16b577cc239cbd6129da2904b531c6f3e80 100644 (file)
@@ -17,8 +17,9 @@
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <stdlib.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
index 05783870967ff22c9088be6b12b9ddac95cdb0bb..1052616385ac7823e7b7fe17e01a366601df6490 100644 (file)
@@ -17,8 +17,9 @@
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <unistd.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
+#include <unistd.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index 6b2bc1ab25422aa8b305e4ef3fb71dce32a0eba4..0ddb814e449e719cf1dc598af321df8e877b748e 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 81fa3ab5b2e93954e73ef3b8b168eb2434aeb1f5..6ee1a3c78acd1705961ccfa7cee2d94ab81e398f 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 570a025806c556d50fd5302ff2b472cf8c994ea6..ca10d09e636c29a7031eeec9fad8c688aae1514e 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index d83d9f59feff06130f92ff97f8be9a5ddb7d3471..22da8167b946fd6df9c1d468b0941c70a2a53392 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 8bf338fb466d453c57570b6c0237c843d920f149..21dc4f87574bb417f513dab4e4ef02dcb84dd3a1 100644 (file)
@@ -18,6 +18,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 35e1016bbb7f4c2eec462713a20df3fd57295ba0..e36d53eaac3560b527b19ee85b881820fb5d789e 100644 (file)
@@ -18,6 +18,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 7f7da0cf2193e1e1b2697579a62f4b6445d1484c..689016de7eef9bd4570b88494a9be3fa58396213 100644 (file)
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
-#include <string.h>
 #include <stdlib.h>
+#include <string.h>
 #include <time.h>
 #include <unistd.h>
 
index 819c8898d7fbb9f484c359d17805f5284422d3c5..87f4f6f329b717510aaf6d34b2fe0d6277943ca0 100644 (file)
@@ -17,8 +17,9 @@
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <stdlib.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 #define UNIT_TESTING
index 727c649f900c7c8443413b59d744ad02223e8157..605ebae27effd313784872da90abaf753bb0f6d7 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index d2fdb7f0c12640f3265ad4c53292e34720d05d18..f158616680f542f04cd1da6f7a689a555e4e059a 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <stdlib.h>
+#include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdio.h>
-#include <inttypes.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 #define UNIT_TESTING
index c407e3c23dcb97ded05023b8c1064fbc485225d7..16b2f7441daf5315798beb8ee9a569091b477d6f 100644 (file)
@@ -18,6 +18,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
index b6256e9ab3531bdb2eef91b3a6eb2a0d722fb4c9..6dcb507098c53d27ae4ca637f7524e4c20aea314 100644 (file)
@@ -18,6 +18,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 8a8ffff59922372ccd4cc8d7fb316f51028ebe58..ab8c2296b1f65ea7f8370fada338934b9181fd30 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 8155e2c692ddd03038dbd6264432bfc0f449ade7..520ba5be350d4f5ef07c84eb3d4db503e03b8549 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index ee3def20470eb8d47f8ef28ee95f31e656e5c24a..6bbeeb0cd9d00bae2d835b8ed9374c96b66e59f6 100644 (file)
@@ -19,6 +19,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
index 932cb5edb52b6f7e11283850bb97935dd6992c5d..0867a6934eb69a6f2c7ef95664716a2282f2c080 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <stdlib.h>
-#include <inttypes.h>
 #include <fcntl.h>
-#include <unistd.h>
+#include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
+#include <stdlib.h>
 #include <sys/mman.h>
+#include <unistd.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index 85a993367e84cdc4e079e19c32c30b386e3306c6..afc206ee32c8401a78133024c1079b77e2fc598c 100644 (file)
@@ -20,6 +20,7 @@
 #include <ctype.h>
 #include <fcntl.h>
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 064f0cb614c194533a08d4ede6689d5a45c10487..af0d62f426c2a3e818a97717a9844f4b59c24326 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 36d4e2dc4e616ae14eecba7d84320442655f8868..88b81376119be3c17585b9310e16b6472904081f 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index c0759e568c616286096eff36442ac0a1fb216b38..88433ca26c572556e9f4ae4dfb6fc42d65916382 100644 (file)
@@ -18,6 +18,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index e7149dc377a7158006a85a47d6ac0ea8f713e6c8..12236327be71ee3c640c90ef3a28bd4783e54b68 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <unistd.h>
 
index 32b916d3e3a871150322d595d7503741a2ed13f9..81f985291949fb6781fb4a6ae46d12e201a9d7f8 100644 (file)
@@ -18,6 +18,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 66cd071ab106f1d182746b6d2df9fd9533bca7ea..1709db7d54b7d8bb9045982943b7d17fa8edf960 100644 (file)
@@ -17,8 +17,9 @@
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <string.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 
 #define UNIT_TESTING
index e51239bc3933c43ad15828f4d2211b637f652896..7ead2da004f334ebc59a439fd12f7db2cd4bb95f 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <stdlib.h>
-#include <stdio.h>
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
+#include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 #define UNIT_TESTING
index d5db4fe6122f82906acd08845202ec8822e54a23..590acb6fb820df92b15715541d325b30ea772aa2 100644 (file)
 #if HAVE_CMOCKA
 
 #include <stdarg.h>
-#include <stdbool.h>
 #include <stddef.h>
-#include <stdlib.h>
 #include <setjmp.h>
+
+#include <sched.h> /* IWYU pragma: keep */
+#include <stdbool.h>
+#include <stdlib.h>
+
 #include <cmocka.h>
 
 #include <isc/mem.h>
index c32557eb59ed882f97f14edee27cc952bfa5ca45..ddb420f48a1c9151ff0bbe79534efcd31a090c69 100644 (file)
@@ -17,8 +17,9 @@
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <stdlib.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 #define UNIT_TESTING
index 94f9c97923f533f4b184d04ca93c788a42a11b78..ed4bd3024efabed6a5ed0f2acf4bbe4b0a43e6bc 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <stdlib.h>
-#include <stdio.h>
 #include <inttypes.h>
-#include <unistd.h>
+#include <sched.h> /* IWYU pragma: keep */
+#include <stdio.h>
+#include <stdlib.h>
 #include <time.h>
+#include <unistd.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index be856b2314fb17870c8789b8c26da3986fdd8a5a..d97e2b26485d8c73ff1c497d0a88b8f380c8f38c 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index b929e01bbc82e418436cbb99c9eb605721c13aeb..09102aba58ab04473eb981f344331fe49e9eeb44 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 3afa82d267800dc956cbe3f7a05dec2d2f98e9e1..a4d6715840ea82879f59555214385d32fd970e2d 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 8cbb747e25841ed5cce38ba399593af97bd0567d..e788a4e47c52314dd27ea06adb3283623f48b1a2 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <fcntl.h>
 #include <limits.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 28c1fbb3556b473bdcea256ddb511d4e6522e9ac..838f3e330ea6bca0121f95a574d4f45bc9347049 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 
index ff975a262e39f2937f7ee62bc44f85ac72438c75..7c2d1bf07f77f498538e3c85e99c434c3ebba912 100644 (file)
@@ -19,8 +19,9 @@
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <string.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
+#include <string.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index 8cac0cfab769eb14e32966a6af3160704a9315fb..bffe817cdb0e2868271b5285bdc07165f18cff97 100644 (file)
@@ -18,8 +18,9 @@
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
-#include <stdlib.h>
 
+#include <sched.h> /* IWYU pragma: keep */
+#include <stdlib.h>
 #include <string.h>
 
 #define UNIT_TESTING
index 07f338a0a4019438f964618a1fc102df8873419f..e1abbdf84a4afffad00e958e712d53d454537673 100644 (file)
@@ -18,6 +18,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index ca3f97f9a51952dd7b535fc7a8705d066a34cddf..8ea0c076435fa3365bc90ddf6874f1ec965911f6 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 85d48346629d8a1dce0f282f4f723ad8a41316f3..11876bee7e156541934efc5f3fee23e3cda2e6fe 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <fcntl.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <unistd.h>
-#include <fcntl.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index b0f232d48a01f8644086cd8dfe84109152a9fd90..347602e42c0c17b7f7ad92394ed3107eae6df585 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
-#include <inttypes.h>
-#include <unistd.h>
 #include <time.h>
+#include <unistd.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index 2e6c75044f62cdcf58cf36068f4b9d8c83735826..9d1eb8e03bfb88bc179a527e6ecb6719b37ab8ab 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index de10a542620b1f9e84aceda53521271ccb8251ab..ddd72ffbb74a91edb293bd01bb9dd855f129639d 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <time.h>
+#include <unistd.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index b17391ef798eada63211d5cd476084965a1a5a2d..8d806cf3f0c8000ee7012631fef1ec3b655a9354 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 
index f60422fb5720adfa73f09da4ce518f700a71a783..5d74503bbc3ea46192579ae46541918141212ca4 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <inttypes.h>
 #include <math.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 
index af1d377c708dacc1c7a381851e89e4ab289e315c..dd8984ba3f0a30dd134bf2056db00c460bf76941 100644 (file)
@@ -19,8 +19,9 @@
 #include <stddef.h>
 #include <setjmp.h>
 
-#include <string.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
+#include <string.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index c1b2beb424a912f2be9c4a42aac9a69ec5779848..23df3cfb03f123e60d955bfff9b6f7de91364da0 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 0df13589834f99c39d2f04de2d0ebc7859408e20..fc20f1b5af1fb2573ecaa226603530a43c908bd1 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <time.h>
+#include <unistd.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index 3503952251bdb7732a5f14a7e6a21555a94c622e..9b26d6a82b8bf3e14439315f4f35b442c9578bb3 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 18c1717b9a04a34992c1d386ce18810f3845d747..f8bbd5a4e213ee092183f972d317b5edc6d61e09 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
-#include <unistd.h>
-#include <inttypes.h>
 #include <string.h>
+#include <unistd.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index 3ea3728280c519ffe26360f072d230b53d069420..a01ba342cfc7645d67d0b8308134891d72ba8d96 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 50afbc441e0e960dad82e39cf7adc2603f20680f..101bb57fbc5b0624073acd57e5d90b02ccc13387 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 1415a3fae2db372f347c1d55292058146c155e8b..079345ef42d39123e72086e181580a4d5a168bac 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 51c2a366643d681f91adcec5bb94c0cd353da6ce..7b057af6f761462b00c6e1ad87b8cef6fef6fa28 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 24b5b970f0be7b9931af83c9867fcdfc08339de2..9984cbd086dfdd1f1e20f0a0687be3824c030bca 100644 (file)
 
 #include <stdarg.h>
 #include <stddef.h>
-#include <stdlib.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
+#include <stdlib.h>
+
 #include <isc/util.h>
 
 #include <stdio.h>
index b6884ea7df55a906f485f6229733c50e08d4b053..d2462816ed6c2364511e33af9dabb22ec0bb6109 100644 (file)
 
 #include <stdarg.h>
 #include <stddef.h>
-#include <stdlib.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
+#include <stdlib.h>
+
 #include <isc/util.h>
 
 #include <stdio.h>
index e4d070ed42b84dac4a4882563258ef9007e5d285..6eb40fda16fabc43e9d658b55437cc0bbba13cce 100644 (file)
 
 #include <stdarg.h>
 #include <stddef.h>
-#include <stdlib.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
+#include <stdlib.h>
+
 #define UNIT_TESTING
 #include <cmocka.h>
 
index e88a4bd4f12a5fde102f07736ae6cbbb121c8373..c23dadc6c629d818b8ca965ca1a8fd116299bf8c 100644 (file)
@@ -20,6 +20,7 @@
 #include <isc/util.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>