diff options
author | Patrick McLean <patrick.mclean@sony.com> | 2020-05-01 11:29:38 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2020-05-01 11:29:56 -0700 |
commit | 1bbae6ebce830659c0ccbd8fd2e92ab8d59bd02b (patch) | |
tree | fbe64b0e4088d8f11cb2d7369f3a50aeefe5bbf5 | |
parent | dev-lang/php: security cleanup (diff) | |
download | gentoo-1bbae6ebce830659c0ccbd8fd2e92ab8d59bd02b.tar.gz gentoo-1bbae6ebce830659c0ccbd8fd2e92ab8d59bd02b.tar.bz2 gentoo-1bbae6ebce830659c0ccbd8fd2e92ab8d59bd02b.zip |
net-firewall/nftlb: Add patch for musl (bug #720264)
Closes: https://bugs.gentoo.org/720264
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
-rw-r--r-- | net-firewall/nftlb/files/nftlb-0.6-musl.patch | 72 | ||||
-rw-r--r-- | net-firewall/nftlb/nftlb-0.6.ebuild | 1 |
2 files changed, 73 insertions, 0 deletions
diff --git a/net-firewall/nftlb/files/nftlb-0.6-musl.patch b/net-firewall/nftlb/files/nftlb-0.6-musl.patch new file mode 100644 index 000000000000..99990726f05e --- /dev/null +++ b/net-firewall/nftlb/files/nftlb-0.6-musl.patch @@ -0,0 +1,72 @@ +diff --git a/configure.ac b/configure.ac +index 4e7b0a9..2396857 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2,6 +2,7 @@ AC_INIT([nftlb], [0.6], [netfilter-devel@vger.kernel.org]) + + AC_CONFIG_AUX_DIR([build-aux]) + AC_CONFIG_MACRO_DIR([m4]) ++AC_CONFIG_HEADERS([config.h]) + AM_INIT_AUTOMAKE([-Wall foreign subdir-objects + tar-pax no-dist-gzip dist-bzip2 1.6]) + +@@ -25,5 +26,7 @@ AC_CHECK_HEADER([ev.h], [EVENTINC="-include ev.h"], + [EVENTINC="-include libev/ev.h"], + [AC_MSG_ERROR([ev.h not found])])]) + ++AC_CHECK_HEADERS([execinfo.h]) ++ + AC_CONFIG_FILES([Makefile src/Makefile]) + AC_OUTPUT +diff --git a/src/main.c b/src/main.c +index b6b5ec4..b2a080f 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -18,6 +18,7 @@ + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ ++#include "config.h" + + #include <stdio.h> + #include <stdlib.h> +@@ -26,7 +27,10 @@ + #include <syslog.h> + #include <errno.h> + #include <unistd.h> ++ ++#ifdef HAVE_EXECINFO_H + #include <execinfo.h> ++#endif /* HAVE_EXECINFO_H */ + + #include "config.h" + #include "objects.h" +@@ -85,6 +89,7 @@ static void nftlb_sighandler(int signo) + exit(EXIT_SUCCESS); + } + ++#ifdef HAVE_EXECINFO_H + static void nftlb_trace() { + void *buffer[255]; + char **str; +@@ -106,6 +111,7 @@ static void nftlb_trace() { + + exit(EXIT_FAILURE); + } ++#endif /* HAVE_EXECINFO_H */ + + int main(int argc, char *argv[]) + { +@@ -157,8 +163,12 @@ int main(int argc, char *argv[]) + + if (signal(SIGINT, nftlb_sighandler) == SIG_ERR || + signal(SIGTERM, nftlb_sighandler) == SIG_ERR || ++#ifdef HAVE_EXECINFO_H + signal(SIGPIPE, SIG_IGN) == SIG_ERR || + signal(SIGSEGV, nftlb_trace) == SIG_ERR) { ++#else ++ signal(SIGPIPE, SIG_IGN) == SIG_ERR) { ++#endif /* HAVE_EXECINFO_H */ + fprintf(stderr, "Error assigning signals\n"); + syslog(LOG_ERR, "Error assigning signals"); + return EXIT_FAILURE; diff --git a/net-firewall/nftlb/nftlb-0.6.ebuild b/net-firewall/nftlb/nftlb-0.6.ebuild index 2cb16c516014..99822681780a 100644 --- a/net-firewall/nftlb/nftlb-0.6.ebuild +++ b/net-firewall/nftlb/nftlb-0.6.ebuild @@ -25,6 +25,7 @@ RESTRICT="test" PATCHES=( "${FILESDIR}/nftlb-0.6-tests.patch" + "${FILESDIR}/nftlb-0.6-musl.patch" ) pkg_setup() { |