forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
58d30be
commit faee40d
Showing
2 changed files
with
45 additions
and
6 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
dev-db/mongodb/files/mongodb-3.4.6-sysmacros-include.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From e245cac2b3c18015dee8caddd449532785d15c2b Mon Sep 17 00:00:00 2001 | ||
From: Jason Carey <[email protected]> | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters