setserial: fix compilation with GCC14
authorRosen Penev <rosenp@gmail.com>
Thu, 16 May 2024 01:51:21 +0000 (18:51 -0700)
committerRosen Penev <rosenp@gmail.com>
Fri, 17 May 2024 06:33:11 +0000 (23:33 -0700)
Need to add explicit int.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
utils/setserial/Makefile
utils/setserial/patches/030-gcc14.patch [new file with mode: 0644]

index e11adb2a392092e7bc4fff3d62581fe3e120f6c7..9a76433232b2362121e03a6c003d350232117f04 100644 (file)
@@ -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 (file)
index 0000000..f646d78
--- /dev/null
@@ -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;