elinks/elinks-configure-c99.patch

25 lines
856 B
Diff

PR submitted upstream: https://github.com/rkd77/elinks/pull/212
Author: Arjun Shankar <arjun@redhat.com>
Date: Fri Mar 24 14:10:43 2023 +0100
configure: Fix an "implicit int" warning
configure defines a main function without a return type, leading to a
-Wimplicit-int warning (enabled by default in C99 and later dialects).
This commit fixes that.
diff --git a/configure.ac b/configure.ac
index d3bf724aa997173e..ef23337b34e2617f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -390,7 +390,7 @@ void foo(const char *format, ...) {
exit(0);
}
-main() { foo("hello\n"); }
+int main() { foo("hello\n"); }
]])],[el_cv_HAVE_C99_VSNPRINTF=yes],[el_cv_HAVE_C99_VSNPRINTF=no],[el_cv_HAVE_C99_VSNPRINTF=cross])])
if test x"$el_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
EL_DEFINE(HAVE_C99_VSNPRINTF, [C99 compliant vsnprintf()])