diff options
Diffstat (limited to 'meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-build-breakage-from-lock_guard-error-6161.patch')
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-build-breakage-from-lock_guard-error-6161.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-build-breakage-from-lock_guard-error-6161.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-build-breakage-from-lock_guard-error-6161.patch new file mode 100644 index 0000000000..87c70617a1 --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-Fix-build-breakage-from-lock_guard-error-6161.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Subject: [PATCH] Fix build breakage from lock_guard error (#6161) | ||
2 | |||
3 | Summary: | ||
4 | This change fixes a source issue that caused compile time error which | ||
5 | breaks build for many fbcode services in that setup. The size() member | ||
6 | function of channel is a const member, so member variables accessed | ||
7 | within it are implicitly const as well. This caused error when clang | ||
8 | fails to resolve to a constructor that takes std::mutex because the | ||
9 | suitable constructor got rejected due to loss of constness for its | ||
10 | argument. The fix is to add mutable modifier to the lock_ member of | ||
11 | channel. | ||
12 | |||
13 | Pull Request resolved: https://github.com/facebook/rocksdb/pull/6161 | ||
14 | |||
15 | Differential Revision: D18967685 | ||
16 | |||
17 | Pulled By: maysamyabandeh | ||
18 | |||
19 | Upstream-Status: Backport | ||
20 | |||
21 | fbshipit-source-id:698b6a5153c3c92eeacb842c467aa28cc350d432 | ||
22 | --- a/storage/rocksdb/rocksdb/util/channel.h | ||
23 | +++ b/storage/rocksdb/rocksdb/util/channel.h | ||
24 | @@ -60,7 +60,7 @@ class channel { | ||
25 | |||
26 | private: | ||
27 | std::condition_variable cv_; | ||
28 | - std::mutex lock_; | ||
29 | + mutable std::mutex lock_; | ||
30 | std::queue<T> buffer_; | ||
31 | bool eof_; | ||
32 | }; | ||