diff options
author | Jason Carey <jcarey@argv.me> | 2017-06-26 11:09:10 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-10-02 10:29:00 -0400 |
commit | 65507e2a2a3fecdd726415bb05dc624d1fcaa63b (patch) | |
tree | 57e84fee4b020d5932238a79bdf959b3f47bbb61 /src | |
parent | 9b93a0d19a4ac32b1a9989b1f6545eec0863b1a1 (diff) | |
download | mongo-65507e2a2a3fecdd726415bb05dc624d1fcaa63b.tar.gz |
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
(cherry picked from commit e245cac2b3c18015dee8caddd449532785d15c2b)
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/storage/mmap_v1/mmap_v1_engine.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 f8439bb3288..fc71ab8c455 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/operations.hpp> #include <fstream> +#ifdef __linux__ +#include <sys/sysmacros.h> +#endif + #include "mongo/db/mongod_options.h" #include "mongo/db/storage/mmap_v1/mmap.h" #include "mongo/db/storage/mmap_v1/data_file_sync.h" |