Commit 5573361f authored by thomasanderson's avatar thomasanderson Committed by Commit Bot

[Protobuf] Add <map> include to workaround a gcc bug

GCC gets a bit confused by libc++'s map headers, and including <map>
after <set> can cause problems under certain conditions [1].

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81347

BUG=webrtc:7922
R=pkasting@chromium.org,dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2974603002
Cr-Commit-Position: refs/heads/master@{#486608}
parent 8e8b54f1
...@@ -86,3 +86,7 @@ Description of the patches: ...@@ -86,3 +86,7 @@ Description of the patches:
removed in C++11 mode. removed in C++11 mode.
Fixed in https://github.com/google/protobuf/pull/1549 Fixed in https://github.com/google/protobuf/pull/1549
- 0012-add-map-include.patch
Workaround for gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81347
diff -ru protobuf2/src/google/protobuf/descriptor.h protobuf/src/google/protobuf/descriptor.h
--- protobuf2/src/google/protobuf/descriptor.h 2017-07-06 15:32:27.892104861 -0700
+++ protobuf/src/google/protobuf/descriptor.h 2017-07-06 15:19:07.042709476 -0700
@@ -54,6 +54,7 @@
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_H__
#define GOOGLE_PROTOBUF_DESCRIPTOR_H__
+#include <map>
#include <memory>
#ifndef _SHARED_PTR_H
#include <google/protobuf/stubs/shared_ptr.h>
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_H__ #ifndef GOOGLE_PROTOBUF_DESCRIPTOR_H__
#define GOOGLE_PROTOBUF_DESCRIPTOR_H__ #define GOOGLE_PROTOBUF_DESCRIPTOR_H__
#include <map>
#include <memory> #include <memory>
#ifndef _SHARED_PTR_H #ifndef _SHARED_PTR_H
#include <google/protobuf/stubs/shared_ptr.h> #include <google/protobuf/stubs/shared_ptr.h>
......
...@@ -9,6 +9,10 @@ MB is a wrapper script for GYP and GN that can be used to generate build files ...@@ -9,6 +9,10 @@ MB is a wrapper script for GYP and GN that can be used to generate build files
for sets of canned configurations and analyze them. for sets of canned configurations and analyze them.
""" """
# TODO(thomasanderson): Remove this comment. It is added to
# workaround https://crbug.com/736215 for CL
# https://codereview.chromium.org/2974603002/
from __future__ import print_function from __future__ import print_function
import argparse import argparse
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment