tools: protoc: fix compilation with recent clang

Similar to 553ed5fa94 found in contribs.

Co-authored-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Steve Lhomme 2022-02-21 13:34:52 +01:00 committed by Hugo Beauzée-Luyssen
parent e4869da270
commit ff0e412d42
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,14 @@
--- protobuf/src/google/protobuf/repeated_field.h.orig 2022-02-17 12:44:54.526527423 +0200
+++ protobuf/src/google/protobuf/repeated_field.h 2022-02-17 12:44:58.190446363 +0200
@@ -46,11 +46,7 @@
#ifndef GOOGLE_PROTOBUF_REPEATED_FIELD_H__
#define GOOGLE_PROTOBUF_REPEATED_FIELD_H__
-#ifdef _MSC_VER
-// This is required for min/max on VS2013 only.
#include <algorithm>
-#endif
-
#include <string>
#include <iterator>
#include <google/protobuf/stubs/casts.h>

View File

@ -329,6 +329,7 @@ protobuf-$(PROTOBUF_VERSION).tar.gz:
protobuf: protobuf-$(PROTOBUF_VERSION).tar.gz
$(UNPACK)
$(APPLY) $(TOOLS)/protobuf-fix-build.patch
$(APPLY) $(TOOLS)/protobuf-include-algorithm.patch
$(MOVE)
.buildprotoc: protobuf