Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
-Wimplicit-int fixes for various ports
To:
ports@openbsd.org
Date:
Thu, 4 Dec 2025 17:26:59 +0100

Download raw body.

Thread
gcc15 does not like implicit int. These ports fail because the configure
scripts think 'main()' is good enough.

Fixing this is trivial and we already patch up most of those scripts for
other reasons.

This is just the tip of the Wimplicit-int iceberg but this is a start.
-- 
:wq Claudio

Index: devel/cgdb/patches/patch-config_readline_check_version_m4
===================================================================
RCS file: /cvs/ports/devel/cgdb/patches/patch-config_readline_check_version_m4,v
diff -u -p -r1.2 patch-config_readline_check_version_m4
--- devel/cgdb/patches/patch-config_readline_check_version_m4	1 Mar 2022 13:43:33 -0000	1.2
+++ devel/cgdb/patches/patch-config_readline_check_version_m4	4 Dec 2025 12:39:08 -0000
@@ -10,3 +10,12 @@ Index: config/readline_check_version.m4
  CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
  LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
  
+@@ -86,7 +86,7 @@ AC_CACHE_VAL(ac_cv_rl_version,
+ #include <stdlib.h>
+ #include <readline/readline.h>
+ 
+-main()
++int main()
+ {
+ 	FILE *fp;
+ 	fp = fopen("conftest.rlv", "w");
Index: devel/sdlmm/patches/patch-configure
===================================================================
RCS file: /cvs/ports/devel/sdlmm/patches/patch-configure,v
diff -u -p -r1.2 patch-configure
--- devel/sdlmm/patches/patch-configure	11 Mar 2022 18:53:25 -0000	1.2
+++ devel/sdlmm/patches/patch-configure	4 Dec 2025 12:39:08 -0000
@@ -1,5 +1,15 @@
---- configure.orig	Mon Aug 13 21:39:00 2001
-+++ configure	Sun Feb  5 11:36:41 2006
+Index: configure
+--- configure.orig
++++ configure
+@@ -1178,7 +1178,7 @@ cat > conftest.$ac_ext << EOF
+ #line 1179 "configure"
+ #include "confdefs.h"
+ 
+-main(){return(0);}
++int main(){return(0);}
+ EOF
+ if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
 @@ -5876,7 +5876,6 @@ fi
      echo "$ac_t""no" 1>&6
    fi
Index: devel/smpeg/patches/patch-configure
===================================================================
RCS file: /cvs/ports/devel/smpeg/patches/patch-configure,v
diff -u -p -r1.4 patch-configure
--- devel/smpeg/patches/patch-configure	11 Mar 2022 18:53:27 -0000	1.4
+++ devel/smpeg/patches/patch-configure	4 Dec 2025 12:39:08 -0000
@@ -1,5 +1,15 @@
---- configure.orig	Sat Jan  7 17:32:32 2012
-+++ configure	Sat Jan  7 17:33:52 2012
+Index: configure
+--- configure.orig
++++ configure
+@@ -1055,7 +1055,7 @@ cat > conftest.$ac_ext << EOF
+ #line 1056 "configure"
+ #include "confdefs.h"
+ 
+-main(){return(0);}
++int main(){return(0);}
+ EOF
+ if { (eval echo configure:1061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
 @@ -2001,9 +2001,10 @@ else
    cat > conftest.$ac_ext <<EOF
  #line 2003 "configure"
Index: textproc/clo++/patches/patch-configure
===================================================================
RCS file: /cvs/ports/textproc/clo++/patches/patch-configure,v
diff -u -p -r1.2 patch-configure
--- textproc/clo++/patches/patch-configure	19 May 2017 23:17:24 -0000	1.2
+++ textproc/clo++/patches/patch-configure	4 Dec 2025 12:39:08 -0000
@@ -1,6 +1,15 @@
 Index: configure
 --- configure.orig
 +++ configure
+@@ -906,7 +906,7 @@ cat > conftest.$ac_ext << EOF
+ #line 907 "configure"
+ #include "confdefs.h"
+ 
+-main(){return(0);}
++int main(){return(0);}
+ EOF
+ if { (eval echo configure:912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   ac_cv_prog_cc_works=yes
 @@ -1234,11 +1234,11 @@ fi
  XML_CONFIG_ERROR="
  *** You need to have libxml2 installed to use clo++