]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Always include <errno.h> instead of <sys/errno.h>
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:46 +0000 (21:25 +0200)
Including <sys/errno.h> instead of <errno.h> raises a compiler warning
when building against musl libc.  Always include <errno.h> instead of
<sys/errno.h> to prevent that compilation warning from being triggered
and to achieve consistency in this regard across the entire source tree.

(cherry picked from commit b5cd146033a5a269cae5784ef64d7045fa9f487c)

bin/named/fuzz.c
contrib/dlz/modules/common/dlz_dbi.c
lib/isc/tests/errno_test.c

index 5907877c2d4eb54d0d315021acb94fceed4eb088..47b15f5d5cdb34ea44afc3732eb9497c96683b11 100644 (file)
@@ -19,7 +19,7 @@
 #ifdef ENABLE_AFL
 #include <named/globals.h>
 #include <named/server.h>
-#include <sys/errno.h>
+#include <errno.h>
 
 #include <isc/app.h>
 #include <isc/condition.h>
index 566e10b2ba4d8e84ef05c288a2b68b7134c117c2..7b4c9da5f0baf6e5034255bf91a03c69e39ef308 100644 (file)
@@ -41,6 +41,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
@@ -48,8 +49,6 @@
 #include <stdlib.h>
 #include <ctype.h>
 
-#include <sys/errno.h>
-
 #include <dlz_minimal.h>
 #include <dlz_list.h>
 #include <dlz_dbi.h>
index c4f8beb48f00170bb5d28cd8c16697e36103d813..39a1f01ec0aa670a91cb02782033bb1db990444c 100644 (file)
 #include <stddef.h>
 #include <setjmp.h>
 
+#include <errno.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include <sys/errno.h>
-
 #define UNIT_TESTING
 #include <cmocka.h>