]> 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:18 +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.

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

index b82ac372121ac7a40fc4be66662c0a6b063da0d6..02c75d303aa0d8e75ffb9a1573d07c144edb94f8 100644 (file)
@@ -17,7 +17,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 5d62a954d99d7691a72bffd69402369c8d4992d5..5b111499d83eaae0f803069fd7a8b45ada4f7101 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>