diff options
Diffstat (limited to 'debian/patches/kfreebsd_support.patch')
-rw-r--r-- | debian/patches/kfreebsd_support.patch | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/debian/patches/kfreebsd_support.patch b/debian/patches/kfreebsd_support.patch new file mode 100644 index 0000000..4e89f32 --- /dev/null +++ b/debian/patches/kfreebsd_support.patch @@ -0,0 +1,131 @@ +Description: Improve kFreeBSD support +Author: Gonéri Le Bouder <goneri@rulezlan.org> +Bug-Debian: http://bugs.debian.org/626062 +--- a/src/openvpn/route.c ++++ b/src/openvpn/route.c +@@ -1693,7 +1693,7 @@ + argv_msg(D_ROUTE, &argv); + status = openvpn_execve_check(&argv, es, 0, "ERROR: Solaris route add command failed"); + +-#elif defined(TARGET_FREEBSD) ++#elif defined(TARGET_FREEBSD) || defined(__FreeBSD_kernel__) + + argv_printf(&argv, "%s add", + ROUTE_PATH); +@@ -1879,7 +1879,7 @@ + network = print_in6_addr( r6->network, 0, &gc); + gateway = print_in6_addr( r6->gateway, 0, &gc); + +-#if defined(TARGET_DARWIN) \ ++#if defined(TARGET_DARWIN) || defined(__FreeBSD_kernel__) \ + || defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) \ + || defined(TARGET_OPENBSD) || defined(TARGET_NETBSD) + +@@ -2047,7 +2047,7 @@ + argv_msg(D_ROUTE, &argv); + status = openvpn_execve_check(&argv, es, 0, "ERROR: Solaris route add -inet6 command failed"); + +-#elif defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) ++#elif defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) || defined(__FreeBSD_kernel__) + + argv_printf(&argv, "%s add -inet6 %s/%d", + ROUTE_PATH, +@@ -2239,7 +2239,7 @@ + argv_msg(D_ROUTE, &argv); + openvpn_execve_check(&argv, es, 0, "ERROR: Solaris route delete command failed"); + +-#elif defined(TARGET_FREEBSD) ++#elif defined(TARGET_FREEBSD) || defined(__FreeBSD_kernel__) + + argv_printf(&argv, "%s delete -net %s %s %s", + ROUTE_PATH, +@@ -2346,7 +2346,7 @@ + network = print_in6_addr( r6->network, 0, &gc); + gateway = print_in6_addr( r6->gateway, 0, &gc); + +-#if defined(TARGET_DARWIN) \ ++#if defined(TARGET_DARWIN) || defined(__FreeBSD_kernel__) \ + || defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) \ + || defined(TARGET_OPENBSD) || defined(TARGET_NETBSD) + +@@ -2481,7 +2481,7 @@ + argv_msg(D_ROUTE, &argv); + openvpn_execve_check(&argv, es, 0, "ERROR: Solaris route delete -inet6 command failed"); + +-#elif defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) ++#elif defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) || defined(__FreeBSD_kernel__) + + argv_printf(&argv, "%s delete -inet6 %s/%d", + ROUTE_PATH, +@@ -3532,7 +3532,8 @@ + + #elif defined(TARGET_DARWIN) || defined(TARGET_SOLARIS) \ + || defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) \ +- || defined(TARGET_OPENBSD) || defined(TARGET_NETBSD) ++ || defined(TARGET_OPENBSD) || defined(TARGET_NETBSD) \ ++ || defined(__FreeBSD_kernel__) + + #include <sys/types.h> + #include <sys/socket.h> +--- a/src/openvpn/tun.c ++++ b/src/openvpn/tun.c +@@ -845,7 +845,7 @@ + #endif /* if defined(_WIN32) || defined(TARGET_DARWIN) || defined(TARGET_NETBSD) || defined(TARGET_OPENBSD) */ + + #if defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) \ +- || defined(TARGET_NETBSD) || defined(TARGET_OPENBSD) ++ || defined(TARGET_NETBSD) || defined(TARGET_OPENBSD) || defined(__FreeBSD_kernel__) + /* we can't use true subnet mode on tun on all platforms, as that + * conflicts with IPv6 (wants to use ND then, which we don't do), + * but the OSes want "a remote address that is different from ours" +@@ -1429,7 +1429,7 @@ + add_route_connected_v6_net(tt, es); + } + +-#elif defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) ++#elif defined(TARGET_FREEBSD) || defined(TARGET_DRAGONFLY) || defined(__FreeBSD_kernel__) + + in_addr_t remote_end; /* for "virtual" subnet topology */ + +@@ -2785,7 +2785,7 @@ + } + } + +-#elif defined(TARGET_FREEBSD) ++#elif defined(TARGET_FREEBSD)||defined(__FreeBSD_kernel__) + + static inline int + freebsd_modify_read_write_return(int len) +--- a/src/openvpn/lladdr.c ++++ b/src/openvpn/lladdr.c +@@ -50,7 +50,7 @@ + "%s %s lladdr %s", + IFCONFIG_PATH, + ifname, lladdr); +-#elif defined(TARGET_FREEBSD) ++#elif defined(TARGET_FREEBSD) || defined(__FreeBSD_kernel__) + argv_printf(&argv, + "%s %s ether %s", + IFCONFIG_PATH, +--- a/src/openvpn/syshead.h ++++ b/src/openvpn/syshead.h +@@ -297,7 +297,7 @@ + + #endif /* TARGET_OPENBSD */ + +-#ifdef TARGET_FREEBSD ++#if defined(TARGET_FREEBSD) || defined(__FreeBSD_kernel__) + + #ifdef HAVE_SYS_UIO_H + #include <sys/uio.h> +--- a/src/openvpn/ssl.c ++++ b/src/openvpn/ssl.c +@@ -2270,7 +2270,7 @@ + buf_printf(&out, "IV_PLAT=mac\n"); + #elif defined(TARGET_NETBSD) + buf_printf(&out, "IV_PLAT=netbsd\n"); +-#elif defined(TARGET_FREEBSD) ++#elif defined(TARGET_FREEBSD) || defined(__FreeBSD_kernel__) + buf_printf(&out, "IV_PLAT=freebsd\n"); + #elif defined(TARGET_ANDROID) + buf_printf(&out, "IV_PLAT=android\n"); |