vishalmishra434 / rpms / openssh

Forked from rpms/openssh 3 months ago
Clone
d5591f
commit 5eb796a369c64f18d55a6ae9b1fa9b35eea237fb
d5591f
Author: Harmen Stoppels <harmenstoppels@gmail.com>
d5591f
Date:   Thu Oct 13 16:08:46 2022 +0200
d5591f
d5591f
    Fix snprintf configure test for clang 15
d5591f
    
d5591f
    Clang 15 -Wimplicit-int defaults to an error in C99 mode and above.
d5591f
    A handful of tests have "main(..." and not "int main(..." which caused
d5591f
    the tests to produce incorrect results.
d5591f
d5591f
diff --git a/configure.ac b/configure.ac
d5591f
index de60a1b1..165c49de 100644
d5591f
--- a/configure.ac
d5591f
+++ b/configure.ac
d5591f
@@ -713,7 +713,7 @@ case "$host" in
d5591f
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
d5591f
 #include <mach-o/dyld.h>
d5591f
 #include <stdlib.h>
d5591f
-main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
d5591f
+int main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
d5591f
 		exit(0);
d5591f
 	else
d5591f
 		exit(1);
d5591f
@@ -4259,7 +4259,7 @@ dnl test snprintf (broken on SCO w/gcc)
d5591f
 #include <stdlib.h>
d5591f
 #include <string.h>
d5591f
 #ifdef HAVE_SNPRINTF
d5591f
-main()
d5591f
+int main()
d5591f
 {
d5591f
 	char buf[50];
d5591f
 	char expected_out[50];
d5591f
@@ -4276,7 +4276,7 @@ main()
d5591f
 	exit(0);
d5591f
 }
d5591f
 #else
d5591f
-main() { exit(0); }
d5591f
+int main() { exit(0); }
d5591f
 #endif
d5591f
 		]])], [ true ], [ AC_DEFINE([BROKEN_SNPRINTF]) ],
d5591f
 		AC_MSG_WARN([cross compiling: Assuming working snprintf()])