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
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])
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
+#include <time.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>