diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4 index 816f4431f54..1a0136d8db2 100644 --- a/ext/mysqlnd/config9.m4 +++ b/ext/mysqlnd/config9.m4 @@ -58,12 +58,17 @@ dnl AC_CACHE_CHECK([whether whether compiler supports Decimal32/64/128 types], ac_cv_decimal_fp_supported,[ AC_TRY_RUN( [ #include +#include int main(int argc, char **argv) { typedef float dec32 __attribute__((mode(SD))); dec32 k = 99.49f; double d2 = (double)k; - return 0; + const char *check_str = "99.49"; + char print_str[32]; + + snprintf(print_str, 32, "%f", d2); + return memcmp(print_str, check_str, 5); } ],[ ac_cv_decimal_fp_supported=yes