summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gentoo.org>2020-07-12 16:49:46 +0300
committerAndrew Savchenko <bircoph@gentoo.org>2020-07-12 17:14:38 +0300
commit7e2c66693ed08e55462f261140e9334398ea5c84 (patch)
tree4ef23904d54a8444f047b53458278c90f057b91c /net-dialup
parentsys-libs/ldb: arm stable (bug #730472) (diff)
downloadgentoo-7e2c66693ed08e55462f261140e9334398ea5c84.tar.gz
gentoo-7e2c66693ed08e55462f261140e9334398ea5c84.tar.bz2
gentoo-7e2c66693ed08e55462f261140e9334398ea5c84.zip
net-dialup/openl2tp: fix build with musl
Closes: https://bugs.gentoo.org/717064 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'net-dialup')
-rw-r--r--net-dialup/openl2tp/files/openl2tp-1.8-musl.patch55
-rw-r--r--net-dialup/openl2tp/openl2tp-1.8-r1.ebuild1
2 files changed, 56 insertions, 0 deletions
diff --git a/net-dialup/openl2tp/files/openl2tp-1.8-musl.patch b/net-dialup/openl2tp/files/openl2tp-1.8-musl.patch
new file mode 100644
index 000000000000..437f96f4d6fc
--- /dev/null
+++ b/net-dialup/openl2tp/files/openl2tp-1.8-musl.patch
@@ -0,0 +1,55 @@
+diff -u openl2tp-1.8/cli/cli_readline.c openl2tp-1.8/cli/cli_readline.c
+--- openl2tp-1.8/cli/cli_readline.c 2020-07-12 11:16:13.583798412 +0300
++++ openl2tp-1.8/cli/cli_readline.c 2020-07-12 11:35:50.872615494 +0300
+@@ -18,12 +18,15 @@
+ *
+ *****************************************************************************/
+
++#define _GNU_SOURCE
++
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/file.h>
+ #include <sys/stat.h>
+-#include <sys/errno.h>
++#include <fcntl.h>
++#include <errno.h>
+ #include <signal.h>
+
+ #include <readline/readline.h>
+@@ -633,7 +636,7 @@
+
+ static int cli_rl_install_signal_handlers(void)
+ {
+- __sighandler_t handler;
++ sighandler_t handler;
+
+ rl_catch_signals = 0;
+ rl_clear_signals();
+unchanged:
+--- openl2tp-1.8.orig/usl/usl_pid.c 2008-05-08 00:44:20.000000000 +0400
++++ openl2tp-1.8/usl/usl_pid.c 2020-07-12 10:29:47.047052036 +0300
+@@ -26,6 +26,10 @@
+
+ #include "usl.h"
+
++#ifndef WAIT_ANY
++#define WAIT_ANY (-1)
++#endif
++
+ /* We maintain a list of child process pids and functions to call when
+ * they exit.
+ */
+unchanged:
+--- openl2tp-1.8.orig/l2tp_main.c 2010-02-12 22:09:23.000000000 +0300
++++ openl2tp-1.8/l2tp_main.c 2020-07-12 10:58:59.343655159 +0300
+@@ -42,7 +42,7 @@
+ #include <setjmp.h>
+ #include <sys/utsname.h>
+
+-#include <wait.h>
++#include <sys/wait.h>
+
+ #include "usl.h"
+ #include "l2tp_private.h"
diff --git a/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild b/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild
index 778f59179e29..8a763797d129 100644
--- a/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild
+++ b/net-dialup/openl2tp/openl2tp-1.8-r1.ebuild
@@ -48,6 +48,7 @@ PATCHES=(
"${FILESDIR}/${P}-cflags.patch"
"${FILESDIR}/${P}-tirpc.patch"
"${FILESDIR}/${P}-native-tc.patch"
+ "${FILESDIR}/${P}-musl.patch"
)
src_prepare() {