setserial: fix compilation with GCC14

Need to add explicit int.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2024-05-15 18:51:21 -07:00
parent 7345b73c30
commit 4866908604
2 changed files with 23 additions and 1 deletions

View 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

View File

@ -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;