diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-23 21:41:50 +0200 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-23 21:41:50 +0200 |
commit | bc2d1e4b5ecd5fc9270b8d8a65cbd445b7fb783f (patch) | |
tree | 7eeed01f0f612364f572feea012e77b8ae0f647a | |
parent | 719e27ddc2f0b48bcd7fe5584b23e3ce83ddf291 (diff) | |
download | monitoring-plugins-bc2d1e4b5ecd5fc9270b8d8a65cbd445b7fb783f.tar.gz |
Somehow this fixes detection of the availability of struct timeval for me
-rw-r--r-- | configure.ac | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index a294b00f..2ddc5035 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -645,12 +645,16 @@ AC_TRY_COMPILE([#include <sys/time.h>], | |||
645 | [struct timeval *tv; | 645 | [struct timeval *tv; |
646 | struct timezone *tz;], | 646 | struct timezone *tz;], |
647 | AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure]) | 647 | AC_DEFINE(HAVE_STRUCT_TIMEVAL,1,[Define if we have a timeval structure]) |
648 | AC_TRY_COMPILE([#include <sys/time.h>], | 648 | FOUND_STRUCT_TIMEVAL="yes") |
649 | [struct timeval *tv; | 649 | |
650 | struct timezone *tz; | 650 | if test x$FOUND_STRUCT_TIMEVAL = x"yes"; then |
651 | gettimeofday(tv, tz);], | 651 | AC_TRY_COMPILE([#include <sys/time.h>], |
652 | AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]), | 652 | [struct timeval *tv; |
653 | AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed]))) | 653 | struct timezone *tz; |
654 | gettimeofday(tv, tz);], | ||
655 | AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define if gettimeofday is found]), | ||
656 | AC_DEFINE(NEED_GETTIMEOFDAY,1,[Define if gettimeofday is needed])) | ||
657 | fi | ||
654 | 658 | ||
655 | dnl Checks for library functions. | 659 | dnl Checks for library functions. |
656 | AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor) | 660 | AC_CHECK_FUNCS(memmove select socket strdup strstr strtol strtoul floor) |