commit:     de42887364fb0681a6045f33b48dfefe58c46298
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 27 00:55:29 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Apr 27 00:55:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de428873

net-vpn/pptpd: fix Modern C issue

Interestingly, this only seems to manifest with >=glibc-2.38, because
the include had a '#ifndef HAVE_STRLCPY' guard.

Closes: https://bugs.gentoo.org/920775
Closes: https://bugs.gentoo.org/927333
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-vpn/pptpd/files/pptpd-1.4.0-c99.patch                | 16 ++++++++++++++++
 .../{pptpd-1.4.0-r3.ebuild => pptpd-1.4.0-r4.ebuild}     |  3 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/net-vpn/pptpd/files/pptpd-1.4.0-c99.patch 
b/net-vpn/pptpd/files/pptpd-1.4.0-c99.patch
new file mode 100644
index 000000000000..902a275d5f35
--- /dev/null
+++ b/net-vpn/pptpd/files/pptpd-1.4.0-c99.patch
@@ -0,0 +1,16 @@
+https://bugs.gentoo.org/920775
+https://bugs.gentoo.org/927333
+
+--- a/compat.c
++++ b/compat.c
+@@ -10,9 +10,9 @@
+ 
+ #include "compat.h"
+ #include "our_syslog.h"
++#include <string.h>
+ 
+ #ifndef HAVE_STRLCPY
+-#include <string.h>
+ #include <stdio.h>
+ 
+ void strlcpy(char *dst, const char *src, size_t size)

diff --git a/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild 
b/net-vpn/pptpd/pptpd-1.4.0-r4.ebuild
similarity index 96%
rename from net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
rename to net-vpn/pptpd/pptpd-1.4.0-r4.ebuild
index 425dcbcb8d78..c5805c7696e2 100644
--- a/net-vpn/pptpd/pptpd-1.4.0-r3.ebuild
+++ b/net-vpn/pptpd/pptpd-1.4.0-r4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -40,6 +40,7 @@ src_prepare() {
                "${FILESDIR}/${P}-pidfile.patch"
                "${FILESDIR}/${P}-libdir.patch"
                "${FILESDIR}/${P}-musl.patch"
+               "${FILESDIR}/${P}-c99.patch"
        )
 
        if has_version -d ">=net-dialup/ppp-2.5.0"; then

Reply via email to