]> 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:08:40 +0000 (21:08 +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.

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 056e6469d26ecfc5eb23508b14e752952aa50b74..5e7c34dbea692a1bac1c93d074632b23b0efdd6f 100644 (file)
@@ -15,8 +15,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 07f0cd160a6e82321aa27e616efde1e100bcc946..6738a53a1f77a7a5df729ef6d1e700ab4d4c464e 100644 (file)
@@ -15,8 +15,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 d310e784d03d656219d8ceb2d77360502519d20a..1306bf8ac0064a94d8cc4c8ae7a9f933a4fa23d0 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 374f248f0a0e4cddfc4a502207d3e0d5e3d6cae1..e825b7b4d2b89721786df2ebba28d34a536806bf 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 5cb0f0446ca9a5b7804a398f0f28e4c2fa3d4d3a..79272735ca6b33b92aafdfb2b5fe51ede8669181 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 8c2267dc227d909ce48ec0c24f358e7ad34822b6..6893aee1a666a3e08f10ecf138164bd6453cc163 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index bfc0bd343f4d6b82d10fda4c019159d299b5d344..9785fbfbae8caf529179d7c3645b1cd441b4cce5 100644 (file)
@@ -16,6 +16,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index f28e149a8bfc3c3a7cdc7ad0026923805c635426..da71a6c546739280e06fca99e084f225482c2233 100644 (file)
@@ -16,6 +16,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index cf4d35f7a3a28881c014bfe5d89f7fe32a6dee35..ce83df60a2802040c1ef7385cd84df69d31e22b0 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 9809f5db77d9bf0e0c1e664a572b0ccb95685d0a..0abe21452025e6d4671383f84c30aca10f782a61 100644 (file)
@@ -15,8 +15,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 a09f66e552694ae5f8200cfb4dcc65fb4e99b49d..7481881a1e2413787971b2bb19ed1e02af63c84a 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 1a92c2f2a2a95136d1dfefdbf491e0df233738d6..c6f777f03a8f547548c5c55cd9e468dc569d86b0 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 73a0e64be2d92566895249cda226de0e86cab173..cbf55f4942b8b32fe69ed8120cdf2020b4798205 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
index 239c25d075fc64b07fa981174a2a5af397c61caa..b3dcf81176f2e23be7069c967866524486b50ed7 100644 (file)
@@ -16,6 +16,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 7df028ddc1f7292a2073ee4e86ee2bf279a31776..8b43aadb0e399b00c5eee48aad2d6e06faaf985e 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 5ba37c831bc57e27471d97e6aeb8b6233eb8b921..3ad5bc8274b4fe1ac55e7ed919c08ab1a7558372 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index e8e642d1baea795f3e2cbe9c5629c74f14a5fde1..7ea6ba61f7190dca08b0f9b6e5551d2ef8c07665 100644 (file)
@@ -16,6 +16,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <unistd.h>
index 26894c9d7be72b85e959602cb91283a3a8b14708..b4cd765e3982128518b8f6af1ad92ec29acb23e7 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 158bf1dede552f3875fd00e1c507ee115a8f1717..478ef686733646ab288b62b50b6a4425c29e9954 100644 (file)
@@ -18,6 +18,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 0bf9779b7ee97707ecaca47e27b273d5d02e05b6..dc95ba6e26df48b5d361192d8babe2ab1840c383 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index ec9bd929e72a782d3dbe75b2dc52b1b158bb13e4..bf9eee8c557af4fd97034e1cc1f1d087d9fafc05 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 39c6f87a4d880bca683ad500422a09aa99571715..53e518229b78f48632067c9d8f402d5aa0da00d1 100644 (file)
@@ -16,6 +16,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index df26b6c0dde632fa536166a2bd9fe6b4a42e7ab8..3d34e9fd4f8613fefd278575a49fc7118b978036 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <unistd.h>
 
index 3b0433ec3da67f0569c39baaee2ea057b7039766..d0dcb8992dfbe353ddbf0615474f55f69e83a004 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 065f5a98b31b2e382600fb865654756ae75d727c..45e68def586e6513d37a32c03def640aced3f765 100644 (file)
@@ -15,8 +15,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 f4b152562cff6751b00300a860e2b84dd7ef69c6..c1c03620216ba939c70ee9505ca4b3fd7768d5d9 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 8727f1eddd3503e65cfee23049a443c33aaad9bf..f78cb2e6ae0900d7d8a852b95ca71b907aefb120 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 0092a9be51e04e63563b649174585184637e8380..c489fcfeffbf101ee6001e69c1cc4ff23288c6bc 100644 (file)
@@ -15,8 +15,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 168d1be99e5bae5b8c65d902357d02215a9b71ff..9798ccf1922361ea2b5eb7663d8ca119a7b40e95 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 59471f1e8f6b5478b43c9952e580e8debee4d78a..2ab5c66ab36d610582690f66e11a49dcb894432c 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index d558c2957fe8e0366a470340e55e481b85716059..ede2977341868b74cf17a3efc56f07ffba65fa37 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 2d4b6e80efb50385d2b22bd73b71931ce00b7b11..81b601d52a16f1aebfaf8aa2812ea691784467ad 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 83aba23a16d861c17bc3ab9ef7ead071a14fd6c5..80d01e04e437a870040b07e7eb5bb358f3d11e51 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <fcntl.h>
 #include <limits.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 424ddf28210ff8dccac0b7b0dcb122c9472d597e..6770dd24536f429069d5f28753d9da9b8c3e9b67 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 
index b29b441caa562bc04b1981bb09015a29bb7ac6ae..9cc043152a79a2cbf09787d59c5704c4c179b8af 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>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index b86e8d5b54286453470214a702ceed4dcff74acb..9e49baffcbdf74ab3a00da8649ff7800c458df76 100644 (file)
@@ -16,8 +16,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 b712187ad0dbd7796b6278d718a707b069104d7e..ff7446cce147e02931c5b55363a454435a40f2e0 100644 (file)
@@ -16,6 +16,7 @@
 #include <setjmp.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 42b53020bff7aa2ab058832b417c3f3a6b766e71..ab44d151627390902cd4a6ec734c688cae011400 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index eea3eed7cd2087ff1939dd33b389487eed3ed374..293ba3fcd3aad2f946175cb85e5f24da4ce9d3fb 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 2db2684dbde3af6bb3dfff30ccb811ec888edc8f..60dfa188e4b1f51667796503033bcde687093512 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 20a0aaeed7d3f681fdc1adec2a9329976a748d18..b902869b86511f0923fee81137bbef87d03b67f2 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index f360ec9df424bc9db93c30b5f8cf2dffc9c97a11..c60e1e27b976cc1639f977ca8929e03d8dbf45b1 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 5af46a58515a0b0c24be2075efdcbcb1b235f13d..5f49ac08fd24a854bae915c07e49cc8776270922 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 
index 18fcb3eb604fc14a43f8a6613a056ace0f61fe00..56f37ce025689909c2079e34542ecc0e75eb7737 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <inttypes.h>
 #include <math.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 
index 086c7715085a13d21864f32ae058b06851bb5d1e..92cfc8262ef5639eae3f2c2d0d5a2f11dee430d9 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>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index 056ebd925abda4e92b5e3e1030f61129b2500cc7..64e3490ca4e9920a9e3b18b592e04f345e6991dd 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 35b33ea6986ea5da5f8a70abc6ad6272ff50029b..20cf26b22d3325f0e6cf3e837d927b568ab1f16a 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 ef08a0801013a9d5d2571a4f447e6f233cb9b024..fea0cda6995761cf9dcefc1b2ae9ccbe1b431ff7 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 1043b4d1d4073aad0c53f6fd938fdbd7c9215e97..9a0b902e220151e23f93bcdeb55b65878c6bec06 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 1355a9268e39ad33123a0c193f0a22f44b53c727..a7453d96e801364afafa098b1c8103fc8c399523 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 61a1792ba4a77a37740f4a79f2237222ef21e0bc..122997c8b8f64bbe905022a07621ac8cd601b010 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 31e0cf55f3207add71d4dc2330c766ad32d357fb..d2fa9fcbea717fad59867b7795998a73b33e3d8a 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
index 75bb474589decc96709ad0b8f93f4136efe0817c..d684c6b268a144cab93db21c6b1a7afedd1c473b 100644 (file)
@@ -15,6 +15,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index a0aecd77074803fb662424d29849264a8b85f1d8..5d4fd8763e50b3d4b47fbc338253645483510d4b 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 de5433680ea64c6e7adc2bf2bf376ae1ece60323..1094c26391a86471f811dccf3879b4e93ca7c888 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 8a7e207ca453ab5cd7ec9003addc13296040a249..de910a9bd948e11ad17d1b7b4a7386515f7854b0 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 770c9f485e855551e46f5ea4329d197b830c2521..bcbeecc1677fc243553ee44de9f9f48486b0cab1 100644 (file)
@@ -18,6 +18,7 @@
 #include <isc/util.h>
 
 #include <inttypes.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>