aboutsummaryrefslogtreecommitdiffstats
path: root/testing/vpnc/working.patch
diff options
context:
space:
mode:
authorRien Maertens <maertensrien@gmail.com>2018-04-14 16:25:28 +0200
committerFrancesco Colista <fcolista@alpinelinux.org>2018-04-27 14:49:30 +0000
commit4ef863eddf913a706033070a18f6a2bf9288726d (patch)
treee4118dd3799149c4c8a0db4ff4ce8e628e0f31a5 /testing/vpnc/working.patch
parentda0a1a54513f4222dbcafd53d11fdd35529cc615 (diff)
downloadaports-4ef863eddf913a706033070a18f6a2bf9288726d.tar.bz2
aports-4ef863eddf913a706033070a18f6a2bf9288726d.tar.xz
testing/vpnc: musl compatibility fix
Diffstat (limited to 'testing/vpnc/working.patch')
-rw-r--r--testing/vpnc/working.patch50
1 files changed, 33 insertions, 17 deletions
diff --git a/testing/vpnc/working.patch b/testing/vpnc/working.patch
index 2a6e1a19a2..52ec3975cc 100644
--- a/testing/vpnc/working.patch
+++ b/testing/vpnc/working.patch
@@ -1,29 +1,45 @@
-diff --git a/sysdep.c b/sysdep.c
-index ff07753..43fdb74 100644
---- a/sysdep.c
-+++ b/sysdep.c
-@@ -59,7 +59,7 @@
+Author: Rien Maertens <maertensrien@gmail.com>
+Description: Fixes VPNC not working. Patch taken and modified from OpenWRT.
+URL: https://github.com/openwrt/packages/blob/master/net/vpnc/patches/100-musl-compat.patch
+--- orig/config.c
++++ patched/config.c
+@@ -26,7 +26,10 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <errno.h>
++#include <sys/ttydefaults.h>
++#include <sys/types.h>
+ #include <sys/utsname.h>
++#include <sys/wait.h>
+
+ #include <gcrypt.h>
+
+--- orig/sysdep.c
++++ patched/sysdep.c
+@@ -59,6 +59,10 @@
#if defined(__DragonFly__)
#include <net/tun/if_tun.h>
#elif defined(__linux__)
--#include <linux/if_tun.h>
-+/*#include <linux/if_tun.h>*/
++# if !defined(__GLIBC__) && !defined(__UCLIBC__)
++# define _LINUX_IF_ETHER_H
++# include <net/ethernet.h>
++# endif
+ #include <linux/if_tun.h>
#elif defined(__APPLE__)
/* no header for tun */
- #elif defined(__CYGWIN__)
-diff --git a/sysdep.h b/sysdep.h
-index a5eafd6..af34e94 100644
---- a/sysdep.h
-+++ b/sysdep.h
-@@ -38,11 +38,13 @@ int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr);
-
+--- orig/sysdep.h
++++ patched/sysdep.h
+@@ -37,12 +37,14 @@
+ int tun_get_hwaddr(int fd, char *dev, uint8_t *hwaddr);
+
/***************************************************************************/
- #if defined(__linux__) || defined(__GLIBC__)
-+#ifdef __GLIBC__
+-#if defined(__linux__) || defined(__GLIBC__)
++#if defined(__GLIBC__) || defined(__UCLIBC__)
#include <error.h>
+#define HAVE_ERROR 1
+#endif
-
+
++#if defined(__linux__) || defined(__GLIBC__)
#define HAVE_VASPRINTF 1
#define HAVE_ASPRINTF 1
-#define HAVE_ERROR 1