commit:     c3fe928536b125fae4f578bc23dc2c4ee3b49723
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sun May  7 12:23:18 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun May  7 12:34:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c3fe9285

net-ftp/pure-ftpd: fix implicit function declarations

Closes: https://bugs.gentoo.org/900068
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../files/pure-ftpd-1.0.51-sys-sendfile.patch      | 37 ++++++++++++++++++++++
 ...1.0.51-r1.ebuild => pure-ftpd-1.0.51-r2.ebuild} |  5 ++-
 2 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/net-ftp/pure-ftpd/files/pure-ftpd-1.0.51-sys-sendfile.patch 
b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.51-sys-sendfile.patch
new file mode 100644
index 000000000000..bc2973c1389c
--- /dev/null
+++ b/net-ftp/pure-ftpd/files/pure-ftpd-1.0.51-sys-sendfile.patch
@@ -0,0 +1,37 @@
+From 511315971f227ac2ce1481ff9e7350a607f78d23 Mon Sep 17 00:00:00 2001
+From: Sam James <[email protected]>
+Date: Sun, 23 Apr 2023 06:27:20 +0100
+Subject: [PATCH] configure.ac: Silence harmless
+ -Wimplicit-function-declaration warning in hpux sendfile check
+
+We're currently looking for build systems where -Wimplicit-function-declaration
+is emitted by checks as it often implies a missing include, but in this case,
+it's fine - HPUX doesn't have a sendfile header, so it's just noise (and it
+won't be true on Linux anyway).
+
+But the check is run unconditionally and we already check if sendfile.h exists,
+so include the header conditionally if it exists, as it's harmless and it 
avoids
+it looking like there's a problem in pure-ftpd.
+
+Unfortunately, it's not so easy to silence the sendfilev check which has
+a similar (but different) problem because it uses AC_CHECK_FUNCS.
+
+Bug: https://bugs.gentoo.org/900068
+---
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 62768c8..0abb423 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -718,6 +718,9 @@ AC_MSG_CHECKING([if a hpuxish sendfile is available])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ #include <sys/socket.h>
+ #include <stdio.h>
++#ifdef HAVE_SYS_SENDFILE_H
++# include <sys/sendfile.h>
++#endif
+ ]], [[
+ do {
+  int fd = 0;

diff --git a/net-ftp/pure-ftpd/pure-ftpd-1.0.51-r1.ebuild 
b/net-ftp/pure-ftpd/pure-ftpd-1.0.51-r2.ebuild
similarity index 97%
rename from net-ftp/pure-ftpd/pure-ftpd-1.0.51-r1.ebuild
rename to net-ftp/pure-ftpd/pure-ftpd-1.0.51-r2.ebuild
index 223cdb2a5ea7..78000f7885e9 100644
--- a/net-ftp/pure-ftpd/pure-ftpd-1.0.51-r1.ebuild
+++ b/net-ftp/pure-ftpd/pure-ftpd-1.0.51-r2.ebuild
@@ -48,7 +48,10 @@ RDEPEND="
 
 BDEPEND="sys-devel/autoconf-archive"
 
-PATCHES=( "${FILESDIR}/${PN}-1.0.28-pam.patch" )
+PATCHES=(
+       "${FILESDIR}/${PN}-1.0.28-pam.patch"
+       "${FILESDIR}/${PN}-1.0.51-sys-sendfile.patch"
+)
 
 src_prepare() {
        default

Reply via email to