[packages/mongodb] - fix building with gcc 11, rel 13
baggins
baggins at pld-linux.org
Sun Aug 22 19:00:18 CEST 2021
commit dcd1f2f1659977214ca66e1c8c214a6486a0f8f6
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Aug 22 18:59:56 2021 +0200
- fix building with gcc 11, rel 13
gcc11.patch | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
mongodb.spec | 4 +++-
2 files changed, 68 insertions(+), 1 deletion(-)
---
diff --git a/mongodb.spec b/mongodb.spec
index 8c2374c..433d43a 100644
--- a/mongodb.spec
+++ b/mongodb.spec
@@ -8,7 +8,7 @@ Summary: MongoDB client shell and tools
Summary(pl.UTF-8): Powłoka kliencka i narzędzia dla bazy danych MongoDB
Name: mongodb
Version: 2.2.4
-Release: 12
+Release: 13
License: AGPL v3
Group: Applications/Databases
Source0: http://downloads.mongodb.org/src/%{name}-src-r%{version}.tar.gz
@@ -27,6 +27,7 @@ Patch6: no-Werror.patch
Patch7: gcc6.patch
Patch8: %{name}-pcap.patch
Patch9: boost-1.73.patch
+Patch10: gcc11.patch
URL: http://www.mongodb.org/
BuildRequires: boost-devel >= 1.50
BuildRequires: libpcap-devel
@@ -160,6 +161,7 @@ konfiguracji oraz skrypty init.d.
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
# Fix permissions
find -type f -executable | xargs chmod a-x
diff --git a/gcc11.patch b/gcc11.patch
new file mode 100644
index 0000000..92e3a62
--- /dev/null
+++ b/gcc11.patch
@@ -0,0 +1,65 @@
+--- mongodb-src-r2.2.4/src/mongo/db/namespace.h~ 2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/namespace.h 2021-08-22 18:30:50.941369906 +0200
+@@ -31,7 +31,7 @@
+ explicit Namespace(const char *ns) { *this = ns; }
+ Namespace& operator=(const char *ns);
+
+- bool hasDollarSign() const { return strchr( buf , '$' ) > 0; }
++ bool hasDollarSign() const { return strchr( buf , '$' ) != 0; }
+ void kill() { buf[0] = 0x7f; }
+ bool operator==(const char *r) const { return strcmp(buf, r) == 0; }
+ bool operator==(const Namespace& r) const { return strcmp(buf, r.buf) == 0; }
+--- mongodb-src-r2.2.4/src/mongo/db/client.h~ 2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/client.h 2021-08-22 18:31:39.654710221 +0200
+@@ -262,6 +262,6 @@
+ inline Client::GodScope::~GodScope() { cc()._god = _prev; }
+
+
+- inline bool haveClient() { return currentClient.get() > 0; }
++ inline bool haveClient() { return currentClient.get() != 0; }
+
+ };
+--- mongodb-src-r2.2.4/src/mongo/client/connpool.h~ 2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/client/connpool.h 2021-08-22 18:32:59.911405982 +0200
+@@ -259,7 +259,7 @@
+ return _conn;
+ }
+
+- bool ok() const { return _conn > 0; }
++ bool ok() const { return _conn != 0; }
+
+ string getHost() const { return _host; }
+
+--- mongodb-src-r2.2.4/src/mongo/s/shard.h~ 2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/s/shard.h 2021-08-22 18:33:42.971429662 +0200
+@@ -274,7 +274,7 @@
+ _finishedInit = true;
+ }
+
+- bool ok() const { return _conn > 0; }
++ bool ok() const { return _conn != 0; }
+
+ /**
+ this just passes through excpet it checks for stale configs
+--- mongodb-src-r2.2.4/src/mongo/db/ops/update_internal.cpp~ 2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/db/ops/update_internal.cpp 2021-08-22 18:36:03.678206895 +0200
+@@ -1117,7 +1117,7 @@
+ continue;
+ }
+
+- _hasDynamicArray = _hasDynamicArray || strstr( fieldName , ".$" ) > 0;
++ _hasDynamicArray = _hasDynamicArray || strstr( fieldName , ".$" ) != 0;
+
+ Mod m;
+ m.init( op , f , forReplication );
+--- mongodb-src-r2.2.4/src/mongo/s/d_state.cpp~ 2013-04-01 04:41:49.000000000 +0200
++++ mongodb-src-r2.2.4/src/mongo/s/d_state.cpp 2021-08-22 18:37:07.564938002 +0200
+@@ -411,7 +411,7 @@
+ if ( ! shardingState.hasVersion( ns ) )
+ return false;
+
+- return ShardedConnectionInfo::get(false) > 0;
++ return ShardedConnectionInfo::get(false) != 0;
+ }
+
+ class UnsetShardingCommand : public MongodShardCommand {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mongodb.git/commitdiff/dcd1f2f1659977214ca66e1c8c214a6486a0f8f6
More information about the pld-cvs-commit
mailing list