]> 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 20:22:27 +0000 (22:22 +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)

54 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/gost_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/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/atomic_test.c
lib/isc/tests/buffer_test.c
lib/isc/tests/counter_test.c
lib/isc/tests/errno_test.c
lib/isc/tests/heap_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

index 3b6c338b2a7f67fe5b2d4c230826efd3119aeff6..ebd39c52d423877a684a7e1b548d5e876c91560d 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 
index b5eb9ba67c03cf9cb891971a1f2457459074715b..35cf21d0f261b92a322c4583baf1ea6715d1fa4d 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 1c1c02ae4a859b1caf4b228bdc858400938bca26..e2759a3962352babdd45fb9bdb54a17d2557ad57 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 e514e6ba905f03c2450884898877c1ddc21d5961..a3e9a5036e28d8c268ec08f0a6e92f9de878b70f 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 a72670ad6493e52578dc476d133774201e9446b9..a53249a63959fcb5cb16a2d4c221e54bcba8d3a0 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 4dbfd82fc44034fca76ba5287ee8f37a8384c326..da1f5e9a80af0a8dbdc41710fcd3fcfd74ce406f 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 de24567293d02988beab32fe003b6dfa68e05ad2..ddc8bf16216c03ae82d9d8e893de84d22eac5d5e 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 b470b7b40008fd6e24a8e457db05f91e3781f2e4..d12c094b74919e42a2659e97d420271435d00d0f 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 4f49b30709ec6f61ffa01a2e93d565596c169a5b..25714cdd538d4286dfacbf30aa1b53f4c8887bbb 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 6e2f734990cd9d52c2973677dc01430fc631bb5b..7d563a603adafa90268bad6442dde98a3a1f0ec1 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 3323945443bd51672a929ca7624d29af8dc8e615..d272502a970943233b83ad7a9c5af43ef8abb7ad 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 27f928236d1ed6909953ba237f39fe95ce9ff254..6c378145b9cb014d0c7efe85094eeaf688ebeac8 100644 (file)
@@ -17,6 +17,7 @@
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 6329daf1aab5cdb2265afb6eb7a4c2f0290dc901..18a7a560b1dd7739bea6fddfdcd0df00e4a81c0c 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 5d5f935f299885eb0a7d1c17a1d100078f17a2d2..639a8e66ae3112d493d3ee40b27faed0b1b49967 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 a4a9c9d9e0ad62a2434e8921648c688f43cd30e0..f04744d3b6ed1e3842f0ed09a884db7414e59b47 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 636aa526fbdd9ae1d95fa92784305fb5b5a3ca8d..289b65f28549dff0e487956e35ec43a08deecae1 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 c06c3b5e185329c3a29eeed2888f4baae3a34648..3e8f765fc20191418790c14f1b9aecc254c130ee 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 699da9b1c92f717db3078ceec909603b57818d27..0405511cc1845bbd48561b4d9f0c30f182a8efed 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 55202378e328f99a28c30463faf5c1a3fd366da1..fc9f44860d341aa2f189fc9b1612b19d6ff50359 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 ad828ab0de2663c089f12c7d1a6c35afadfc072d..ede9fec2359c70321455aeca6c9b0a8e561fb035 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 c51a1c7e57df572882542190ccf686a6931b7e3d..0023d25f425e3f5ccd3282fe607f26cf07b47e92 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 670612cb1fc406ba8cc7cc5bc3540992cc3f941f..7c810d1571f94546ff3b103730db07ba355f6cc8 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 4ebf5b81685cabd2b0481ccd185a7c5513272bf5..c9696087a53507631c33748225bf051ecbbaa3c6 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 7703b9ca6c0ba89a47db8607d1aeea0e07426dbe..051880913cba3b86029d5c841372cabb743175ad 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 16214c6793043b50aed3a956727826d414f2f070..f9ac6d0435eff679bb29f4c3405a12d3247cf5cd 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 9ccec9cad6c0cbbabb441abb35e6fdf1aab71369..62864fc8fddd5a0941ac212be5c4892409542b30 100644 (file)
@@ -19,8 +19,9 @@
 #include <stdio.h>
 
 #if defined(OPENSSL) || defined(PKCS11CRYPTO)
-#include <string.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 
 #define UNIT_TESTING
index b148bd8a2c2a0bb2f7ff1f4eb4ba8440037208c3..e0293eca87b4bd384dec13395879ad24abb2f6d7 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 8e5250e72a14185c56fabeba0e9cc93b5602072e..11d011aa9a51422cc10cbd1746a1fa3697d56a27 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 86638cb49fbdabb64708d3c9851784cb5f57439d..4cf6f8f601f3d0540981788dda936f27f3725897 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 3e8eacf4ac12404813a0ebbf8780ebe83844f760..4cc5aa2d4cf9f895790a28d9ccf657ce87b3a6b7 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 4c9ffe656e1780d78c0aa8e6956517b60a66bf1c..f183c0f0ea762f5d4b8c6e207af6bca6af285fe9 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 2cd7d73c70b8c7549fd6862d41b9a62b57ea759d..8342a92321ce31cb393f560bfb46c4bf9236694a 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 120f86a683c64de44ba59390bc81a153595b82e2..1244512e176b00e8215f983ba4c8093b0e246410 100644 (file)
@@ -21,6 +21,7 @@
 #define UNIT_TESTING
 #include <cmocka.h>
 
+#include <sched.h>
 #include <inttypes.h>
 #include <string.h>
 
index b85870c9d831339d88e1d1d614212e471fa38b05..690e533bf4a520e4cfa5672da72c86f12f786633 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 d70d8ee0d15de705377571bcbd673173fd6e25c1..d606a9704ddf35f291d4b2f5d11fccd770833b10 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 6c1ccfe084f97585d924d61a1bd31e4f1940b804..761d243784ff6a92f6ec27bc199646bcb88ac60f 100644 (file)
@@ -18,6 +18,7 @@
 #include <stddef.h>
 #include <stdlib.h>
 
+#include <sched.h>
 #include <string.h>
 #include <sys/errno.h>
 
index 3520901b9142061af7671b58731a7ab2cf4da5c3..a389885267706236613923e027036e2c098e7519 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
-#include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 
 #define UNIT_TESTING
 #include <cmocka.h>
index 7f7afee0ebf9c35da4c8bc2a437ff7e662746c3c..f8998a8460aa4c89a4840aa55cada805c7172eef 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 bd0c62c713c99eb503eaf1890b5bcfabf895ad57..8c7936170939f7b2eaf50039e83170ed585ab054 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 f279a024470f8262de88c3216ddbea12f7f0d15a..f56f385557ab1c545b65852ec76697204b6203c3 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 dd6533c1c39457873fb093025ff0bdbda1abd2c2..9b2a3ac06b96ee9c7760d06aee18acf6dcef7cb3 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 69f8003eb44783edf9d514c44c2dce14c61034c6..a9ef739746323df355dc9db19dfb2e2d8441e2b9 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 45b56be7cf86f795de0050391f57f18f728b1395..21ed8851b7827845989a840db603b008e830fdd5 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 bbe462c6c56aaf90bbcb4ebda700fe758bce85c5..c7300a02d636691b7bb4649fd05e1679bc4560eb 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 228e300c9d28447b3aa38706635e9b28193a2aee..9fdfd7ec2c59a62bcdf251863106882e74319748 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <inttypes.h>
 #include <math.h>
+#include <sched.h> /* IWYU pragma: keep */
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
index 5775b6ed7b74b09b9e0d7e09034f87f6e96473dc..266ac7527d2e09e427c7ea58bee0256639667995 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 4766d697f27be276225e2a5844ddb054395f4582..3827fac20f4af574d0231ee2dbdc1af585e9ed44 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 4406cd621e29a1a4fafb9a3dcc7bcf7b1d84508f..92c199f2f6395592870bc5f18c0e6cfd268f4fa0 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 123d2cc3617ea1c37273085767d2b0a5be0cc935..b4cc549bfbc47c45871335a11d4ae4f9e4834bfe 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 e03548c9285ecaa79d862410d1f4d814653a20b5..5ff41ce441a9d3d616f836bbbc0b737b9b1cfa4d 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 5e780b771caf6ef95d39bc9730ca6a937a22c89a..c53c4ca8325ed3e3013e6e34c4cd18f183e6958b 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 16dfef4106ea0c0fe6a4c5d9e828b492d648e8f4..6609ea6a80e287e4acc9f732fc26e8b9a362b9fe 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>