mirror of git://anongit.mindrot.org/openssh.git
Fix snprintf configure test for clang 15
Clang 15 -Wimplicit-int defaults to an error in C99 mode and above. A handful of tests have "main(..." and not "int main(..." which caused the tests to produce incorrect results.
This commit is contained in:
parent
c64b62338b
commit
5eb796a369
|
@ -713,7 +713,7 @@ case "$host" in
|
||||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||||
#include <mach-o/dyld.h>
|
#include <mach-o/dyld.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
|
int main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
|
||||||
exit(0);
|
exit(0);
|
||||||
else
|
else
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -4259,7 +4259,7 @@ dnl test snprintf (broken on SCO w/gcc)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef HAVE_SNPRINTF
|
#ifdef HAVE_SNPRINTF
|
||||||
main()
|
int main()
|
||||||
{
|
{
|
||||||
char buf[50];
|
char buf[50];
|
||||||
char expected_out[50];
|
char expected_out[50];
|
||||||
|
@ -4276,7 +4276,7 @@ main()
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
main() { exit(0); }
|
int main() { exit(0); }
|
||||||
#endif
|
#endif
|
||||||
]])], [ true ], [ AC_DEFINE([BROKEN_SNPRINTF]) ],
|
]])], [ true ], [ AC_DEFINE([BROKEN_SNPRINTF]) ],
|
||||||
AC_MSG_WARN([cross compiling: Assuming working snprintf()])
|
AC_MSG_WARN([cross compiling: Assuming working snprintf()])
|
||||||
|
|
Loading…
Reference in New Issue