From 3de33656f9dc541832b14556095e88f37f90232f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 23 Jan 2025 16:14:33 -0800 Subject: ncftp: Replace references to ACLOCALEXTRAPATH - ACLOCALEXTRAPATH is gone in core with commit 878e1517d4890b31332a506ce903d57e1d7dff87 - Add patches to fix build with latest clang and gcc - Drop disabling warnings as the fixes above take care of the problem Signed-off-by: Khem Raj --- .../ncftp/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch | 20 ++++++ .../ncftp/ncftp/0002-ncftp-3.2.7-fix-clang.patch | 73 ++++++++++++++++++++++ .../recipes-daemons/ncftp/ncftp_3.2.7.bb | 4 +- 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-daemons/ncftp/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch create mode 100644 meta-networking/recipes-daemons/ncftp/ncftp/0002-ncftp-3.2.7-fix-clang.patch diff --git a/meta-networking/recipes-daemons/ncftp/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch b/meta-networking/recipes-daemons/ncftp/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch new file mode 100644 index 0000000000..9b8a0c778b --- /dev/null +++ b/meta-networking/recipes-daemons/ncftp/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch @@ -0,0 +1,20 @@ +fix select arg detection + +Reference: + https://bugs.gentoo.org/921487 + +Upstream-Status: Inappropriate [unresponsive contact email address] + +Signed-off-by: Yegor Yefremov +Signed-off-by: Khem Raj +--- a/autoconf_local/aclocal.m4 ++++ b/autoconf_local/aclocal.m4 +@@ -4196,7 +4196,7 @@ AC_MSG_CHECKING([types of arguments for + #include + #endif + #include /* MG: always incl */ +-extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl ++extern int select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl + [ac_not_found=no ; break 3],ac_not_found=yes) + done + done diff --git a/meta-networking/recipes-daemons/ncftp/ncftp/0002-ncftp-3.2.7-fix-clang.patch b/meta-networking/recipes-daemons/ncftp/ncftp/0002-ncftp-3.2.7-fix-clang.patch new file mode 100644 index 0000000000..a8de816e62 --- /dev/null +++ b/meta-networking/recipes-daemons/ncftp/ncftp/0002-ncftp-3.2.7-fix-clang.patch @@ -0,0 +1,73 @@ +Fix compilation with clang-16 + +aclocal.m4 contains code that no longer compiles: missing headers and missing +return types. + +Reference: + https://gitweb.gentoo.org/repo/gentoo.git/tree/net-ftp/ncftp/files/ncftp-3.2.7-fix-clang.patch + +Upstream-Status: Inappropriate [unresponsive contact email address] + +Signed-off-by: Yegor Yefremov +Signed-off-by: Khem Raj +--- a/autoconf_local/aclocal.m4 ++++ b/autoconf_local/aclocal.m4 +@@ -3057,6 +3057,7 @@ AC_TRY_LINK([ + #include + #include + #include ++#include + ],[ + struct sockaddr_un uaddr; + +@@ -3285,6 +3286,7 @@ AC_TRY_LINK([ + #ifdef HAVE_RESOLV_H + # include + #endif ++#include + ],[ + /* function-body */ + int len; +@@ -3363,6 +3365,7 @@ else + #include + #include + ++ int + main(int argc, char **argv) + { + /* Note: don't actually call readline, +@@ -5144,6 +5147,7 @@ do + #ifdef HAVE_STDLIB_H + # include + #endif ++#include + + #ifdef HAVE_NCURSES_H + # define NCURSES_OPAQUE 0 +@@ -5175,6 +5179,7 @@ do + #endif + + ++int + main(int argc, char **argv) + { + /* Note: don't actually call curses, since it may block; +@@ -6509,7 +6514,6 @@ char *malloc(); + #endif + #endif /* MG */ + +-int + int main(void) + { + char *data, *data2, *data3; +@@ -6606,8 +6610,9 @@ else + AC_CACHE_CHECK(whether setvbuf arguments are reversed, + ac_cv_func_setvbuf_reversed, + [AC_TRY_RUN([#include ++ $include + /* If setvbuf has the reversed format, exit 0. */ +- main () { ++ int main (void) { + /* This call has the arguments reversed. + A reversed system may check and see that the address of main + is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ diff --git a/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb b/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb index de111cac05..9ef9182b54 100644 --- a/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb +++ b/meta-networking/recipes-daemons/ncftp/ncftp_3.2.7.bb @@ -9,6 +9,8 @@ SRC_URI = "https://www.ncftp.com/public_ftp/ncftp/${BP}-src.tar.xz \ file://ncftp-configure-use-BUILD_CC-for-ccdv.patch \ file://unistd.patch \ file://0001-Forward-port-defining-PREFIX_BINDIR-to-use-new-autoc.patch \ + file://0001-ncftp-3.2.7-fix-gcc14.patch \ + file://0002-ncftp-3.2.7-fix-clang.patch \ " SRC_URI[sha256sum] = "d41c5c4d6614a8eae2ed4e4d7ada6b6d3afcc9fb65a4ed9b8711344bef24f7e8" @@ -20,7 +22,7 @@ PACKAGECONFIG ??= "" PACKAGECONFIG[ccdv] = "--enable-ccdv,--disable-ccdv,," EXTRA_OECONF = "--disable-precomp --disable-universal ac_cv_path_TAR=tar" -ACLOCALEXTRAPATH:append = " -I ${S}/autoconf_local" +EXTRA_AUTORECONF += "-I ${S}/autoconf_local" do_install () { install -d ${D}${bindir} ${D}${sysconfdir} ${D}${mandir} -- cgit v1.2.3-54-g00ecf