From: Kevin McCarthy Date: Mon, 24 Jul 2017 18:19:05 +0000 (-0700) Subject: Add autoconf search for clock_gettime. X-Git-Tag: mutt-1-9-rel~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e03c998518387d46c645192e7809a0e8a58508c;p=mutt 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 --- 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