From 4406883af179fc5962302b07ee6ce511f6f81d94 Mon Sep 17 00:00:00 2001 From: Raphael Borun Das Gupta Date: Sun, 11 Oct 2020 15:32:17 +0200 Subject: [PATCH] foundationdb: fix "was not declared" build errors Since glibc 2.28, `` no longer includes ``, 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)) { ^ --- pkgs/servers/foundationdb/patches/gcc-fixes.patch | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/foundationdb/patches/gcc-fixes.patch b/pkgs/servers/foundationdb/patches/gcc-fixes.patch index 7de05644796..7e591dd55f5 100644 --- a/pkgs/servers/foundationdb/patches/gcc-fixes.patch +++ b/pkgs/servers/foundationdb/patches/gcc-fixes.patch @@ -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 + + #include ++#include + #include + #include + #include +@@ -623,7 +624,7 @@ void getDiskStatistics(std::string const& directory, uint64_t& currentIOs, uint6 unsigned int minorId; disk_stream >> majorId; disk_stream >> minorId;