diff --git a/configure b/configure index 23eeb9280fe..7ad174c9459 100755 --- a/configure +++ b/configure @@ -15771,6 +15771,7 @@ if ${ac_cv_have_isfinite+:} false; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#define _GNU_SOURCE #include int main () diff --git a/configure.ac b/configure.ac index d0913709d31..01246529b6a 100644 --- a/configure.ac +++ b/configure.ac @@ -2534,7 +2534,8 @@ dnl Check for isfinite ac_save_LIBS="$LIBS" LIBS="$LIBS -lm" AC_CACHE_CHECK([for isfinite], ac_cv_have_isfinite, - AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[float f = 0.0; return isfinite(f)]])],[ac_cv_have_isfinite="yes"],[ac_cv_have_isfinite="no"])) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define _GNU_SOURCE +#include ]], [[float f = 0.0; return isfinite(f)]])],[ac_cv_have_isfinite="yes"],[ac_cv_have_isfinite="no"])) if test "$ac_cv_have_isfinite" = "yes" then AC_DEFINE(HAVE_ISFINITE, 1, [Define to 1 if you have the `isfinite' function.]) diff --git a/include/wine/port.h b/include/wine/port.h index 406f190fa24..3548a44ac4f 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -30,7 +30,7 @@ #endif #ifndef _GNU_SOURCE -# define _GNU_SOURCE /* for pread/pwrite */ +# define _GNU_SOURCE /* for pread/pwrite, isfinite */ #endif #include #include