diff options
author | Jan-Espen Oversand <sigsegv@radiotube.org> | 2022-12-13 19:31:51 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-16 05:20:05 +0000 |
commit | ca305be17ae525e1b4ed7ba9bf87dba5f9d5c326 (patch) | |
tree | 61cb1f9acaf16b2b67a8cd7339ec61d12f7c0698 /net-vpn/vtun | |
parent | app-emulation/dlx: revbump, fix build for clang16, fix lto (diff) | |
download | gentoo-ca305be17ae525e1b4ed7ba9bf87dba5f9d5c326.tar.gz gentoo-ca305be17ae525e1b4ed7ba9bf87dba5f9d5c326.tar.bz2 gentoo-ca305be17ae525e1b4ed7ba9bf87dba5f9d5c326.zip |
net-vpn/vtun: fix implicit function decls
Fix implicit setproctitle, also this is libbsd so libbsd is a runtime depencency.
Also fix implicit getpt, grantpt, ptsname, by enabling nonstandard (_GNU_SOURCE)
gnu extensions and extra open/posix (_XOPEN_SOURCE).
Closes: https://bugs.gentoo.org/875443
Signed-off-by: Jan-Espen Oversand <sigsegv@radiotube.org>
Closes: https://github.com/gentoo/gentoo/pull/28656
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-vpn/vtun')
-rw-r--r-- | net-vpn/vtun/files/vtun-3.0.3-includes.patch | 12 | ||||
-rw-r--r-- | net-vpn/vtun/files/vtun-3.0.4-includes.patch | 24 | ||||
-rw-r--r-- | net-vpn/vtun/vtun-3.0.3-r3.ebuild (renamed from net-vpn/vtun/vtun-3.0.3-r2.ebuild) | 5 | ||||
-rw-r--r-- | net-vpn/vtun/vtun-3.0.4-r1.ebuild (renamed from net-vpn/vtun/vtun-3.0.4.ebuild) | 3 |
4 files changed, 39 insertions, 5 deletions
diff --git a/net-vpn/vtun/files/vtun-3.0.3-includes.patch b/net-vpn/vtun/files/vtun-3.0.3-includes.patch index 46ff5eca90a4..517ddf3cbb9c 100644 --- a/net-vpn/vtun/files/vtun-3.0.3-includes.patch +++ b/net-vpn/vtun/files/vtun-3.0.3-includes.patch @@ -20,14 +20,24 @@ #include "linkfd.h" --- a/lib.h +++ b/lib.h -@@ -26,6 +26,7 @@ +@@ -26,6 +26,8 @@ #include <sys/types.h> #include <signal.h> #include <errno.h> +#include <unistd.h> /* read(), write() */ ++#include <bsd/unistd.h> /* setproctitle(), see man libbsd(7) */ #ifdef HAVE_LIBUTIL_H #include <libutil.h> +@@ -35,7 +37,7 @@ + void init_title(int argc,char *argv[],char *env[], char *name); + void set_title(const char *ftm, ...); + #else +- #define init_title( a... ) ++ #define init_title(argc, argv, env, name) setproctitle_init(argc, argv, env) + #define set_title setproctitle + #endif /* HAVE_SETPROC_TITLE */ + --- a/vtun.h +++ b/vtun.h @@ -232,5 +232,9 @@ diff --git a/net-vpn/vtun/files/vtun-3.0.4-includes.patch b/net-vpn/vtun/files/vtun-3.0.4-includes.patch index d17e4acbc5c4..06546c6bd815 100644 --- a/net-vpn/vtun/files/vtun-3.0.4-includes.patch +++ b/net-vpn/vtun/files/vtun-3.0.4-includes.patch @@ -20,14 +20,24 @@ #include "linkfd.h" --- a/lib.h +++ b/lib.h -@@ -26,6 +26,7 @@ +@@ -26,6 +26,8 @@ #include <sys/types.h> #include <signal.h> #include <errno.h> +#include <unistd.h> /* read(), write() */ ++#include <bsd/unistd.h> /* setproctitle(), see man libbsd(7) */ #ifdef HAVE_LIBUTIL_H #include <libutil.h> +@@ -35,7 +37,7 @@ + void init_title(int argc,char *argv[],char *env[], char *name); + void set_title(const char *ftm, ...); + #else +- #define init_title( a... ) ++ #define init_title(argc, argv, env, name) setproctitle_init(argc, argv, env) + #define set_title setproctitle + #endif /* HAVE_SETPROC_TITLE */ + --- a/lock.c +++ b/lock.c @@ -32,6 +32,7 @@ @@ -48,3 +58,15 @@ #include "vtun.h" #include "linkfd.h" +--- a/generic/pty_dev.c ++++ b/generic/pty_dev.c +@@ -22,6 +22,8 @@ + + #include "config.h" + ++#define _GNU_SOURCE // getpt, grantpt ++#define _XOPEN_SOURCE // unlockpt + #include <unistd.h> + #include <fcntl.h> + #include <stdlib.h> + diff --git a/net-vpn/vtun/vtun-3.0.3-r2.ebuild b/net-vpn/vtun/vtun-3.0.3-r3.ebuild index 2152bb74e3ce..aeebc636d14f 100644 --- a/net-vpn/vtun/vtun-3.0.3-r2.ebuild +++ b/net-vpn/vtun/vtun-3.0.3-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -18,7 +18,8 @@ RDEPEND=" lzo? ( dev-libs/lzo:2 ) socks5? ( net-proxy/dante ) ssl? ( dev-libs/openssl:0= ) - zlib? ( sys-libs/zlib )" + zlib? ( sys-libs/zlib ) + dev-libs/libbsd" DEPEND="${RDEPEND}" BDEPEND="sys-devel/bison" diff --git a/net-vpn/vtun/vtun-3.0.4.ebuild b/net-vpn/vtun/vtun-3.0.4-r1.ebuild index a1c1e76bb471..800d5d0feb11 100644 --- a/net-vpn/vtun/vtun-3.0.4.ebuild +++ b/net-vpn/vtun/vtun-3.0.4-r1.ebuild @@ -18,7 +18,8 @@ RDEPEND=" lzo? ( dev-libs/lzo:2 ) socks5? ( net-proxy/dante ) ssl? ( dev-libs/openssl:0= ) - zlib? ( sys-libs/zlib )" + zlib? ( sys-libs/zlib ) + dev-libs/libbsd" DEPEND="${RDEPEND}" BDEPEND="sys-devel/bison" |