Skip to content

Commit

Permalink
patch 9.0.0098: missing include file in timer_create configure check
Browse files Browse the repository at this point in the history
Problem:    missing include file in timer_create configure check.
Solution:   Inlucde stdlib.h.
  • Loading branch information
brammool committed Jul 28, 2022
1 parent 5f30e26 commit 5748b7f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
15 changes: 12 additions & 3 deletions src/auto/configure
Original file line number Diff line number Diff line change
Expand Up @@ -13042,7 +13042,8 @@ $as_echo_n "checking for timer_create... " >&6; }
if ${vim_cv_timer_create+:} false; then :
$as_echo_n "(cached) " >&6
else
save_LIBS="$LIBS"

save_LIBS="$LIBS"
LIBS="$LIBS -lrt"
if test "$cross_compiling" = yes; then :
as_fn_error $? "cross-compiling: please set 'vim_cv_timer_create'" "$LINENO" 5
Expand All @@ -13051,8 +13052,12 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#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) {}
int
Expand Down Expand Up @@ -13086,6 +13091,10 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#endif
#include<signal.h>
#include<time.h>
static void set_flag(union sigval sv) {}
Expand Down
16 changes: 12 additions & 4 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {}
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
98,
/**/
97,
/**/
Expand Down

0 comments on commit 5748b7f

Please sign in to comment.