Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/ncftp: fix GCC 14.x related build errors
@ 2024-06-13 11:39 yegorslists
  2024-06-13 11:51 ` Yegor Yefremov
  2024-06-16 11:22 ` Yann E. MORIN
  0 siblings, 2 replies; 7+ messages in thread
From: yegorslists @ 2024-06-13 11:39 UTC (permalink / raw)
  To: buildroot

From: Yegor Yefremov <yegorslists@googlemail.com>

Patches were taken from Gentoo:

https://bugs.gentoo.org/921487
https://gitweb.gentoo.org/repo/gentoo.git/tree/net-ftp/ncftp/files/ncftp-3.2.7-fix-clang.patch

Fixes:
http://autobuild.buildroot.net/results/058578eae885ce6e206c25b5a24aa11b625adf88/

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 .checkpackageignore                           |  2 +
 .../ncftp/0001-ncftp-3.2.7-fix-gcc14.patch    | 17 +++++
 .../ncftp/0002-ncftp-3.2.7-fix-clang.patch    | 70 +++++++++++++++++++
 3 files changed, 89 insertions(+)
 create mode 100644 package/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch
 create mode 100644 package/ncftp/0002-ncftp-3.2.7-fix-clang.patch

diff --git a/.checkpackageignore b/.checkpackageignore
index dd1fd31e86..52b5090034 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -1067,6 +1067,8 @@ package/musl/0001-avoid-kernel-if_ether.h.patch lib_patch.Upstream
 package/musl/0002-package-musl-Make-scheduler-functions-Linux-compatib.patch lib_patch.Upstream
 package/nano/0001-lib-getrandom.c-fix-build-with-uclibc-1.0.35.patch lib_patch.Upstream
 package/nanocom/0001-fix-build-with-gcc-10.patch lib_patch.Upstream
+package/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch lib_patch.Upstream
+package/ncftp/0002-ncftp-3.2.7-fix-clang.patch lib_patch.Upstream
 package/ncmpc/0001-meson.build-add-atomic-dependency-for-sparc.patch lib_patch.Upstream
 package/ne10/0001-CMakeLists-don-t-hard-code-thumb-code-generation.patch lib_patch.Upstream
 package/ne10/0002-fix-build-without-C.patch lib_patch.Upstream
diff --git a/package/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch b/package/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch
new file mode 100644
index 0000000000..f93abb1142
--- /dev/null
+++ b/package/ncftp/0001-ncftp-3.2.7-fix-gcc14.patch
@@ -0,0 +1,17 @@
+fix select arg detection
+
+Reference:
+ https://bugs.gentoo.org/921487
+
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+--- a/autoconf_local/aclocal.m4
++++ b/autoconf_local/aclocal.m4
+@@ -4196,7 +4196,7 @@
+ #include <sys/select.h>
+ #endif
+ #include <sys/socket.h>	/* 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/package/ncftp/0002-ncftp-3.2.7-fix-clang.patch b/package/ncftp/0002-ncftp-3.2.7-fix-clang.patch
new file mode 100644
index 0000000000..8a71fa3284
--- /dev/null
+++ b/package/ncftp/0002-ncftp-3.2.7-fix-clang.patch
@@ -0,0 +1,70 @@
+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
+
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+--- a/autoconf_local/aclocal.m4
++++ b/autoconf_local/aclocal.m4
+@@ -3057,6 +3057,7 @@
+ #include <sys/uio.h>
+ #include <sys/socket.h>
+ #include <sys/un.h>
++#include <string.h>
+ ],[
+ struct sockaddr_un uaddr;
+ 
+@@ -3285,6 +3286,7 @@
+ #ifdef HAVE_RESOLV_H
+ #	include <resolv.h>
+ #endif
++#include <string.h>
+ ],[
+ 	/* function-body */
+ 	int len;
+@@ -3363,6 +3365,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ 		 
++			int
+ 			main(int argc, char **argv)
+ 			{
+ 				/* Note:  don't actually call readline,
+@@ -5145,6 +5148,7 @@
+ #ifdef HAVE_STDLIB_H
+ #	include <stdlib.h>
+ #endif
++#include <string.h>
+ 
+ #ifdef HAVE_NCURSES_H
+ #	define NCURSES_OPAQUE 0
+@@ -5176,6 +5180,7 @@
+ #endif
+ 
+  
++int
+ main(int argc, char **argv)
+ {
+ 	/* Note:  don't actually call curses, since it may block;
+@@ -6510,7 +6515,6 @@
+ #endif
+ #endif			/* MG */
+ 
+-int
+ int  main(void)
+ {
+ 	char *data, *data2, *data3;
+@@ -6607,8 +6611,9 @@
+ 	AC_CACHE_CHECK(whether setvbuf arguments are reversed,
+ 	  ac_cv_func_setvbuf_reversed,
+ 	[AC_TRY_RUN([#include <stdio.h>
++	$include <stdlib.h>
+ 	/* 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.  */
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-17  9:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-13 11:39 [Buildroot] [PATCH] package/ncftp: fix GCC 14.x related build errors yegorslists
2024-06-13 11:51 ` Yegor Yefremov
2024-06-16 11:43   ` Yann E. MORIN
2024-06-16 11:22 ` Yann E. MORIN
2024-06-16 11:42   ` Yegor Yefremov
2024-06-16 11:55     ` Yann E. MORIN
2024-06-17  9:41       ` Yegor Yefremov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox