pmaports/unity8/mir/0001-Fix-google-protobuf-closure-related-errors.patch
Oliver Smith 3bb5504643
unity8/mir: rebuild against protobuf 3.8.0 (!481)
Add two patches that make it build against Alpine's current versions of
protobuf and libdrm.

[ci:skip-build]: I've manually verified that this builds.
2019-07-06 03:18:49 +02:00

66 lines
2.7 KiB
Diff

From e038df1a9ef91aab176225de7bad6871dc3f2a29 Mon Sep 17 00:00:00 2001
From: Oliver Smith <ollieparanoid@bitmessage.ch>
Date: Fri, 5 Jul 2019 22:43:16 +0200
Subject: [PATCH 1/2] Fix google::protobuf::closure related errors
Include google/protobuf/stubs/callback.h to get rid of build errors like
the following, when building against protobuf 3.8.0:
[ 20%] Building CXX object src/server/scene/CMakeFiles/mirscene.dir/broadcasting_session_event_sink.cpp.o
In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/session_mediator.cpp:19:
In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/session_mediator.h:22:
In file included from /home/pmos/build/src/mir-1.1.2/src/server/frontend/display_server.h:22:
/home/pmos/build/src/mir-1.1.2/src/include/common/mir/protobuf/display_server.h:37:27: error: no type named 'Closure' in namespace 'google::protobuf'
google::protobuf::Closure* done) = 0;
~~~~~~~~~~~~~~~~~~^
/home/pmos/build/src/mir-1.1.2/src/include/common/mir/protobuf/display_server.h:41:27: error: no type named 'Closure' in namespace 'google::protobuf'
google::protobuf::Closure* done) = 0;
~~~~~~~~~~~~~~~~~~^
Related: https://github.com/MirServer/mir/issues/913
---
src/client/rpc/mir_basic_rpc_channel.h | 2 ++
src/include/common/mir/protobuf/display_server.h | 1 +
src/include/common/mir/protobuf/display_server_debug.h | 1 +
3 files changed, 4 insertions(+)
diff --git a/src/client/rpc/mir_basic_rpc_channel.h b/src/client/rpc/mir_basic_rpc_channel.h
index e0af61a..f4a650d 100644
--- a/src/client/rpc/mir_basic_rpc_channel.h
+++ b/src/client/rpc/mir_basic_rpc_channel.h
@@ -27,6 +27,8 @@
#include <condition_variable>
#include <functional>
+#include <google/protobuf/stubs/callback.h>
+
namespace google
{
namespace protobuf
diff --git a/src/include/common/mir/protobuf/display_server.h b/src/include/common/mir/protobuf/display_server.h
index 481af5a..852230d 100644
--- a/src/include/common/mir/protobuf/display_server.h
+++ b/src/include/common/mir/protobuf/display_server.h
@@ -19,6 +19,7 @@
#ifndef MIR_PROTOBUF_DISPLAY_SERVER_H_
#define MIR_PROTOBUF_DISPLAY_SERVER_H_
+#include <google/protobuf/stubs/callback.h>
#include "mir_protobuf.pb.h"
namespace mir
diff --git a/src/include/common/mir/protobuf/display_server_debug.h b/src/include/common/mir/protobuf/display_server_debug.h
index c60436e..20f9583 100644
--- a/src/include/common/mir/protobuf/display_server_debug.h
+++ b/src/include/common/mir/protobuf/display_server_debug.h
@@ -19,6 +19,7 @@
#ifndef MIR_PROTOBUF_DISPLAY_SERVER_DEBUG_H_
#define MIR_PROTOBUF_DISPLAY_SERVER_DEBUG_H_
+#include <google/protobuf/stubs/callback.h>
#include "mir_protobuf.pb.h"
namespace mir
--
2.17.2