Fix clang build failure 75/325275/1 tizen_base
authorVadim Solomin <v.solomin@partner.samsung.com>
Thu, 5 Jun 2025 20:16:42 +0000 (23:16 +0300)
committerVadim Solomin <v.solomin@partner.samsung.com>
Thu, 5 Jun 2025 20:16:42 +0000 (23:16 +0300)
Configure misdetects clang as a K&R (i.e. pre-ANSI) C compiler due to
insufficient quoting in the autoconf test. Brackets after 'argv' get
removed by m4 resulting in the main prototype being int main(int *,
char *). That causes just a warning with gcc, but an error with clang.

Change-Id: Ie0c34d55382c99762b6be0636d277fd957dac851

acinclude.m4

index 7d5a404c6d8a1cbe64f8471de0dd09329d45709e..9895e2d651662476a9160236b43dfc494f237d67 100644 (file)
@@ -3764,11 +3764,11 @@ AC_DEFUN([GMP_C_FOR_BUILD_ANSI],
 AC_CACHE_CHECK([whether build system compiler is ANSI],
                gmp_cv_c_for_build_ansi,
 [cat >conftest.c <<EOF
-int
+[int
 main (int argc, char *argv[])
 {
   exit(0);
-}
+}]
 EOF
 gmp_compile="$CC_FOR_BUILD conftest.c"
 if AC_TRY_EVAL(gmp_compile); then