diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-07-28 12:09:04 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-28 12:09:04 +0100 |
commit | 5748b7f2c8a8e8e6d12b3e2531df5c0261fd8f3b (patch) | |
tree | eee4fa7fd4a72d8c407f3c4e9cdae99437084b8c /src/configure.ac | |
parent | 5f30e26f6946f0d0396499f91fbcfaa9d1f8acf7 (diff) |
patch 9.0.0098: missing include file in timer_create configure checkv9.0.0098
Problem: missing include file in timer_create configure check.
Solution: Inlucde stdlib.h.
Diffstat (limited to 'src/configure.ac')
-rw-r--r-- | src/configure.ac | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/configure.ac b/src/configure.ac index c3935742f2..b52aabcf95 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -3807,12 +3807,16 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM( dnl Check for timer_create. It probably requires the 'rt' library. dnl Run the program to find out if timer_create(CLOCK_MONOTONIC) actually dnl works, on Solaris timer_create() exists but fails at runtime. -AC_CACHE_CHECK([for timer_create], [vim_cv_timer_create], +AC_CACHE_CHECK([for timer_create], [vim_cv_timer_create], [ save_LIBS="$LIBS" LIBS="$LIBS -lrt" AC_RUN_IFELSE([AC_LANG_PROGRAM([ -#include<signal.h> -#include<time.h> +#if STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#endif +#include <signal.h> +#include <time.h> static void set_flag(union sigval sv) {} ], [ struct timespec ts; @@ -3827,6 +3831,10 @@ static void set_flag(union sigval sv) {} AC_MSG_NOTICE(timer_create with -lrt); vim_cv_timer_create=yes, LIBS="$save_LIBS" AC_RUN_IFELSE([AC_LANG_PROGRAM([ +#if STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#endif #include<signal.h> #include<time.h> static void set_flag(union sigval sv) {} @@ -3843,7 +3851,7 @@ static void set_flag(union sigval sv) {} vim_cv_timer_create=yes, vim_cv_timer_create=no), AC_MSG_ERROR(cross-compiling: please set 'vim_cv_timer_create') - ) + )] ) if test "x$vim_cv_timer_create" = "xyes" ; then |