--- src/kmk/configure.in.orig	2017-07-18 19:08:54 UTC
+++ src/kmk/configure.in
@@ -134,6 +134,7 @@ AC_CACHE_CHECK([for standard gettimeofday], ac_cv_func
 AC_CACHE_CHECK([for standard gettimeofday], ac_cv_func_gettimeofday,
   [ac_cv_func_gettimeofday=no
    AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/time.h>
+#include <stdlib.h>
                   int main ()
 	          {
 		    struct timeval t; t.tv_sec = -1; t.tv_usec = -1;
