summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2017-09-05 10:15:17 +0200
committerDavid Seifert <soap@gentoo.org>2017-09-05 10:15:17 +0200
commitfaee40dcab8c8344b772f0d414aa95b2579494d5 (patch)
tree5023140002bdf31b3cc4bbd0fe72376a657a9cd7 /dev-db
parentnet-libs/libtorrent-rasterbar: fix compilation with boost-1.65.0 (diff)
downloadgentoo-faee40dcab8c8344b772f0d414aa95b2579494d5.tar.gz
gentoo-faee40dcab8c8344b772f0d414aa95b2579494d5.tar.bz2
gentoo-faee40dcab8c8344b772f0d414aa95b2579494d5.zip
dev-db/mongodb: Add missing sys/sysmacros.h include
Closes: https://bugs.gentoo.org/show_bug.cgi?id=629906 Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch38
-rw-r--r--dev-db/mongodb/mongodb-3.4.6.ebuild13
2 files changed, 45 insertions, 6 deletions
diff --git a/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch b/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch
new file mode 100644
index 000000000000..868ba73e4421
--- /dev/null
+++ b/dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch
@@ -0,0 +1,38 @@
+From e245cac2b3c18015dee8caddd449532785d15c2b Mon Sep 17 00:00:00 2001
+From: Jason Carey <jcarey@argv.me>
+Date: Mon, 26 Jun 2017 11:09:10 -0400
+Subject: [PATCH] SERVER-29855 Pull major/minor from sys/sysmacros.h
+
+Per newer versions of glibc:
+
+----
+error: In the GNU C Library, "major" is defined
+ by <sys/sysmacros.h>. For historical compatibility, it is
+ currently defined by <sys/types.h> as well, but we plan to
+ remove this soon. To use "major", include <sys/sysmacros.h>
+ directly. If you did not intend to use a system-defined macro
+ "major", you should undefine it after including <sys/types.h>. [-Werror]
+ string path = str::stream() << "/sys/dev/block/" << major(dev) << ':' << minor(dev)
+----
+
+Including <sys/sysmacros.h> appears to be the correct solution to quiet
+the warning
+---
+ src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+index 5a784b25dc7..c43e148d3f4 100644
+--- a/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
++++ b/src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp
+@@ -36,6 +36,10 @@
+ #include <boost/filesystem/path.hpp>
+ #include <fstream>
+
++#ifdef __linux__
++#include <sys/sysmacros.h>
++#endif
++
+ #include "mongo/db/mongod_options.h"
+ #include "mongo/db/storage/mmap_v1/data_file_sync.h"
+ #include "mongo/db/storage/mmap_v1/dur.h"
diff --git a/dev-db/mongodb/mongodb-3.4.6.ebuild b/dev-db/mongodb/mongodb-3.4.6.ebuild
index 18751f0bf10a..5900f1f4fac4 100644
--- a/dev-db/mongodb/mongodb-3.4.6.ebuild
+++ b/dev-db/mongodb/mongodb-3.4.6.ebuild
@@ -100,12 +100,13 @@ pkg_setup() {
}
src_prepare() {
- epatch "${FILESDIR}/${PN}-3.4.0-fix-scons.patch"
- epatch "${FILESDIR}/${P}-no-boost-check.patch"
- epatch "${FILESDIR}/${PN}-3.4.4-Replace-string-with-explicit-std-string.patch"
- if has_version ">=dev-libs/boost-1.62"; then
- epatch "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch"
- fi
+ epatch \
+ "${FILESDIR}/${PN}-3.4.0-fix-scons.patch" \
+ "${FILESDIR}/${P}-no-boost-check.patch" \
+ "${FILESDIR}/${PN}-3.4.4-Replace-string-with-explicit-std-string.patch" \
+ "${FILESDIR}/${PN}-3.2.10-boost-1.62.patch" \
+ "${FILESDIR}/${PN}-3.4.6-sysmacros-include.patch"
+
epatch_user
}