changeset: 7113:f94a97422cd0
user: Kevin McCarthy <[email protected]>
date: Mon Jul 24 11:19:05 2017 -0700
link: http://dev.mutt.org/hg/mutt/rev/f94a97422cd0
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
diffs (29 lines):
diff -r 4a1390537a29 -r f94a97422cd0 configure.ac
--- a/configure.ac Sat Jul 22 19:48:50 2017 -0700
+++ b/configure.ac Mon Jul 24 11:19:05 2017 -0700
@@ -642,6 +642,14 @@
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 -r 4a1390537a29 -r f94a97422cd0 mutt_socket.c
--- a/mutt_socket.c Sat Jul 22 19:48:50 2017 -0700
+++ b/mutt_socket.c Mon Jul 24 11:19:05 2017 -0700
@@ -41,6 +41,7 @@
#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>