Skip to contentSkip to conversation

Consistently use <errno.h>

PATCH Applied Felix Janda 2 participants 3 messages May 2, 2015 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Consistently use <errno.h>

On glibc, <sys/errno.h> is a synomym for <errno.h>. <errno.h> is specified by POSIX, so use that.

Fixes compilation error with musl libc

---
 iptables/ip6tables-restore.c | 2 +-
 iptables/ip6tables-save.c    | 2 +-
 iptables/iptables-restore.c  | 2 +-
 iptables/iptables-save.c     | 2 +-
 iptables/iptables-xml.c      | 2 +-
 iptables/xtables-restore.c   | 2 +-
 iptables/xtables-save.c      | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)
iptables/ip6tables-restore.c +1 -1
index 0f4dd97..9393924 100644
@@ -9,7 +9,7 @@
  */
 
 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdbool.h>
 #include <string.h>
 #include <stdio.h>
iptables/ip6tables-save.c +1 -1
index 56e5afb..f35e921 100644
@@ -6,7 +6,7 @@
  * This code is distributed under the terms of GNU GPL v2
  */
 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdlib.h>
iptables/iptables-restore.c +1 -1
index 261822d..638b171 100644
@@ -6,7 +6,7 @@
  */
 
 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdbool.h>
 #include <string.h>
 #include <stdio.h>
iptables/iptables-save.c +1 -1
index bcf88ae..238f368 100644
@@ -6,7 +6,7 @@
  *
  */
 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdlib.h>
iptables/iptables-xml.c +1 -1
index c7615ab..7461412 100644
@@ -7,7 +7,7 @@
  */
 
 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
iptables/xtables-restore.c +1 -1
index 3cb095f..8808ee9 100644
@@ -6,7 +6,7 @@
  */
 
 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdbool.h>
 #include <string.h>
 #include <stdio.h>
iptables/xtables-save.c +1 -1
index d51cdcf..6b33bed 100644
@@ -7,7 +7,7 @@
  *
  */
 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdlib.h>
Signature · 1 line
2.3.6
maintainer Applied
#1 lore raw
Quoted 4 lines · Felix Janda

On glibc, <sys/errno.h> is a synomym for <errno.h>. <errno.h> is specified by POSIX, so use that.

Fixes compilation error with musl libc

Applied, in future patches please also add a "Signed-off-by" line.

Thanks.

#2 lore raw
Quoted 7 lines · Florian Westphal
Quoted 4 lines · Felix Janda

On glibc, <sys/errno.h> is a synomym for <errno.h>. <errno.h> is specified by POSIX, so use that.

Fixes compilation error with musl libc

Applied, in future patches please also add a "Signed-off-by" line.

Sorry for the missing Signed-off-by.

Thanks for applying,
Felix