You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by mp...@apache.org on 2016/06/03 20:14:20 UTC

mesos git commit: Replaced unportable usage of `time.h` in stout.

Repository: mesos
Updated Branches:
  refs/heads/master ce2585a82 -> 94b6acffd


Replaced unportable usage of `time.h` in stout.

Previously, `duration.hpp` assumed that including <time.h> was
sufficient to ensure that `struct timeval` is defined. Per POSIX,
this is not the case: `struct timeval` is actually defined in
<sys/time.h>. This causes a compilation error on some systems,
notably Alpine Linux.

Review: https://reviews.apache.org/r/48219/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/94b6acff
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/94b6acff
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/94b6acff

Branch: refs/heads/master
Commit: 94b6acffde1ee9a40a8f32cbda35f0ddd62438f4
Parents: ce2585a
Author: Neil Conway <ne...@gmail.com>
Authored: Fri Jun 3 13:42:05 2016 -0600
Committer: Michael Park <mp...@apache.org>
Committed: Fri Jun 3 13:42:05 2016 -0600

----------------------------------------------------------------------
 3rdparty/stout/include/stout/duration.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/94b6acff/3rdparty/stout/include/stout/duration.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/duration.hpp b/3rdparty/stout/include/stout/duration.hpp
index 7a67150..575a53f 100644
--- a/3rdparty/stout/include/stout/duration.hpp
+++ b/3rdparty/stout/include/stout/duration.hpp
@@ -17,7 +17,7 @@
 
 // For 'timeval'.
 #ifndef __WINDOWS__
-#include <time.h>
+#include <sys/time.h>
 #endif // __WINDOWS__
 
 #include <iomanip>