kumquat-buildroot/package/iptables/0003-consistently-use-errno.h.patch
Brendan Heading 208e687ced package/iptables: fix build on musl
Fixes:
http://autobuild.buildroot.net/results/68b/68bf8830f87ab32f4fd650c9dd4a8c80592983a9/
http://autobuild.buildroot.net/results/d9b/d9bb677fb5510adf05ffb4afbc63ead83d7e18dd/
http://autobuild.buildroot.net/results/4b8/4b80b6d0131b624301a5cfcd5541897f411043c9/

.. and others.

This patch includes two backported patches from iptables git, plus one
pending patch not integrated yet.

Signed-off-by: Brendan Heading <brendanheading@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2015-10-04 12:25:45 +02:00

93 lines
2.4 KiB
Diff

From a9214a0b718812d823a933ad580a96a3bf5f4dc6 Mon Sep 17 00:00:00 2001
From: Felix Janda <felix.janda@posteo.de>
Date: Sat, 2 May 2015 21:51:01 +0200
Subject: [PATCH 1/3] 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
Backported from :
http://git.netfilter.org/iptables/commit/?id=043e52bc42021f71b85229f6d78bf7e75b282765
Upstream-Status: backport
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Brendan Heading <brendanheading@gmail.com>
---
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 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/iptables/ip6tables-restore.c b/iptables/ip6tables-restore.c
index b8b9e0d..0927e6d 100644
--- a/iptables/ip6tables-restore.c
+++ b/iptables/ip6tables-restore.c
@@ -9,7 +9,7 @@
*/
#include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <stdio.h>
diff --git a/iptables/ip6tables-save.c b/iptables/ip6tables-save.c
index d819b30..f0349d3 100644
--- a/iptables/ip6tables-save.c
+++ b/iptables/ip6tables-save.c
@@ -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>
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
index 8c942ff..d00b9e7 100644
--- a/iptables/iptables-restore.c
+++ b/iptables/iptables-restore.c
@@ -6,7 +6,7 @@
*/
#include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <stdbool.h>
#include <string.h>
#include <stdio.h>
diff --git a/iptables/iptables-save.c b/iptables/iptables-save.c
index e599fce..3fbdb77 100644
--- a/iptables/iptables-save.c
+++ b/iptables/iptables-save.c
@@ -6,7 +6,7 @@
*
*/
#include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
diff --git a/iptables/iptables-xml.c b/iptables/iptables-xml.c
index 9628447..695cd67 100644
--- a/iptables/iptables-xml.c
+++ b/iptables/iptables-xml.c
@@ -7,7 +7,7 @@
*/
#include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
--
2.4.3