From 48669086040a218a10ec0fe9cc3a55ef6b5fd188 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 15 May 2024 18:51:21 -0700 Subject: [PATCH] setserial: fix compilation with GCC14 Need to add explicit int. Signed-off-by: Rosen Penev --- utils/setserial/Makefile | 2 +- utils/setserial/patches/030-gcc14.patch | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 utils/setserial/patches/030-gcc14.patch diff --git a/utils/setserial/Makefile b/utils/setserial/Makefile index e11adb2a3..9a7643323 100644 --- a/utils/setserial/Makefile +++ b/utils/setserial/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=setserial PKG_VERSION:=2.17 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/setserial diff --git a/utils/setserial/patches/030-gcc14.patch b/utils/setserial/patches/030-gcc14.patch new file mode 100644 index 000000000..f646d785c --- /dev/null +++ b/utils/setserial/patches/030-gcc14.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -689,7 +689,7 @@ cat > conftest.$ac_ext << EOF + #line 690 "configure" + #include "confdefs.h" + +-main(){return(0);} ++int main(){return(0);} + EOF + if { (eval echo configure:695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes +--- a/setserial.c ++++ b/setserial.c +@@ -717,7 +717,7 @@ fprintf(stderr, "\t* port\t\tset the I/O + exit(1); + } + +-main(int argc, char **argv) ++int main(int argc, char **argv) + { + int get_flag = 0, wild_intr_flag = 0; + int c;