You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2018/01/31 01:27:38 UTC

mesos git commit: Added missing protobuf include.

Repository: mesos
Updated Branches:
  refs/heads/master 320ebd7a0 -> 1271048f3


Added missing protobuf include.

When using our bundled version of protobuf, this file is transitively
included from other headers.

The reason why this does not compile in protobuf 3.0.x is due to how
the c++ files are generated. In protobuf 3.0.x (and 3.1.x and 3.2.x)
generated code only includes the protobuf map headers if there is a
map present in the .proto file: https://goo.gl/qYJi8T

>From 3.3.x onwards, all generated files include
google/protobuf/generated_message_table_driven.h, which in turn
includes the map headers: https://goo.gl/UJRNme

In our case, the common/protobuf_utils.hpp includes mesos/mesos.hpp,
which includes a generated protobuf.

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


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

Branch: refs/heads/master
Commit: 1271048f3e906f7e0ab66ae2005ddfbfd0998053
Parents: 320ebd7
Author: Benno Evers <be...@mesosphere.com>
Authored: Wed Jan 31 02:20:45 2018 +0100
Committer: Till Toenshoff <to...@me.com>
Committed: Wed Jan 31 02:25:59 2018 +0100

----------------------------------------------------------------------
 src/common/protobuf_utils.hpp | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1271048f/src/common/protobuf_utils.hpp
----------------------------------------------------------------------
diff --git a/src/common/protobuf_utils.hpp b/src/common/protobuf_utils.hpp
index 0ff7239..9a940db 100644
--- a/src/common/protobuf_utils.hpp
+++ b/src/common/protobuf_utils.hpp
@@ -24,6 +24,8 @@
 
 #include <sys/stat.h>
 
+#include <google/protobuf/map.h>
+
 #include <mesos/mesos.hpp>
 
 #include <mesos/maintenance/maintenance.hpp>