foundationdb: fix "was not declared" build errors
Since glibc 2.28, `<sys/types.h>` no longer includes
`<sys/sysmacros.h>`, which provides these macros,
so we have to explicitly import the latter, too, to fix the following
build problems:
flow/Platform.cpp: In function 'void getDiskStatistics(const string&, uint64_t&, uint64_t&, uint64_t&, uint64_t&, uint64_t&, uint64_t&)':
flow/Platform.cpp:626:56: error: 'gnu_dev_major' was not declared in this scope
if(majorId == (unsigned int) gnu_dev_major(buf.st_dev) && minorId == (unsigned int) gnu_dev_minor(buf.st_dev)) {
^
flow/Platform.cpp:626:111: error: 'gnu_dev_minor' was not declared in this scope
if(majorId == (unsigned int) gnu_dev_major(buf.st_dev) && minorId == (unsigned int) gnu_dev_minor(buf.st_dev)) {
^
This commit is contained in:
parent
f1e628e7af
commit
4406883af1
@ -67,10 +67,18 @@ index b485a8495..82541d439 100644
|
||||
FlowKnobs const* FLOW_KNOBS = new FlowKnobs();
|
||||
|
||||
diff --git a/flow/Platform.cpp b/flow/Platform.cpp
|
||||
index 69dac889a..69b86d4ff 100644
|
||||
index 69dac889a..62bda9edb 100644
|
||||
--- a/flow/Platform.cpp
|
||||
+++ b/flow/Platform.cpp
|
||||
@@ -623,7 +623,7 @@ void getDiskStatistics(std::string const& directory, uint64_t& currentIOs, uint6
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <sys/types.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -623,7 +624,7 @@ void getDiskStatistics(std::string const& directory, uint64_t& currentIOs, uint6
|
||||
unsigned int minorId;
|
||||
disk_stream >> majorId;
|
||||
disk_stream >> minorId;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user