From 2e03c998518387d46c645192e7809a0e8a58508c Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Mon, 24 Jul 2017 11:19:05 -0700 Subject: [PATCH] Add autoconf search for clock_gettime. It appears to be specified in POSIX.1-2001, so just abort if it's not found. Add a missing time.h include in mutt_socket.c --- configure.ac | 8 ++++++++ mutt_socket.c | 1 + 2 files changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 4f41632a..ef408ca9 100644 --- a/configure.ac +++ b/configure.ac @@ -642,6 +642,14 @@ dnl -- end socket dependencies -- if test "$need_socket" = "yes" then AC_CHECK_HEADERS([sys/select.h]) + + mutt_save_LIBS="$LIBS" + LIBS= + AC_SEARCH_LIBS([clock_gettime], [rt], + MUTTLIBS="$MUTTLIBS $LIBS", + AC_MSG_ERROR([Unable to find clock_gettime function])) + LIBS="$mutt_save_LIBS" + AC_MSG_CHECKING([for socklen_t]) AC_EGREP_HEADER(socklen_t, sys/socket.h, AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) diff --git a/mutt_socket.c b/mutt_socket.c index d4b22973..bd585c75 100644 --- a/mutt_socket.c +++ b/mutt_socket.c @@ -41,6 +41,7 @@ #ifdef HAVE_SYS_TIME_H #include #endif +#include #include #ifdef HAVE_SYS_SELECT_H #include -- 2.50.1