aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler
diff options
context:
space:
mode:
authorGravatar pliard@google.com <pliard@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2012-10-02 00:15:46 +0000
committerGravatar pliard@google.com <pliard@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2012-10-02 00:15:46 +0000
commit75575df086cd66e3f2bd7590d828ff69b2dac46b (patch)
treea8058640134338dc93802aeb3b3bd82c34826397 /src/google/protobuf/compiler
parent3d46dad1d20007c8399c71af4d02d0c57092e94a (diff)
Generate missing inclusion of common.h.
FileGenerator::GenerateBuildDescriptors() emits "::google::protobuf::internal::OnShutdown(&$shutdownfilename$);" which is declared in common.h. Although Protobuf is very well tested a compilation error was triggered while rolling Protobuf r423:426. There might be something wrong in the Chromium roll (still in progress). It seems safer anyway not to rely on indirect headers inclusion.
Diffstat (limited to 'src/google/protobuf/compiler')
-rw-r--r--src/google/protobuf/compiler/cpp/cpp_file.cc1
-rw-r--r--src/google/protobuf/compiler/plugin.pb.cc1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_file.cc b/src/google/protobuf/compiler/cpp/cpp_file.cc
index 1bbc89c4..cfe96c8a 100644
--- a/src/google/protobuf/compiler/cpp/cpp_file.cc
+++ b/src/google/protobuf/compiler/cpp/cpp_file.cc
@@ -310,6 +310,7 @@ void FileGenerator::GenerateSource(io::Printer* printer) {
"\n"
"#include <algorithm>\n" // for swap()
"\n"
+ "#include <google/protobuf/stubs/common.h>\n"
"#include <google/protobuf/stubs/once.h>\n"
"#include <google/protobuf/io/coded_stream.h>\n"
"#include <google/protobuf/wire_format_lite_inl.h>\n",
diff --git a/src/google/protobuf/compiler/plugin.pb.cc b/src/google/protobuf/compiler/plugin.pb.cc
index bc0c1f17..65abeafc 100644
--- a/src/google/protobuf/compiler/plugin.pb.cc
+++ b/src/google/protobuf/compiler/plugin.pb.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>