Consistently use <errno.h>
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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.
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