2020-01-18 16:41:59 +01:00
|
|
|
diff --git a/fdbrpc/ContinuousSample.h b/fdbrpc/ContinuousSample.h
|
2020-10-11 15:25:28 +02:00
|
|
|
index 54ff1b109..577c228ae 100644
|
2020-01-18 16:41:59 +01:00
|
|
|
--- a/fdbrpc/ContinuousSample.h
|
|
|
|
+++ b/fdbrpc/ContinuousSample.h
|
|
|
|
@@ -26,6 +26,7 @@
|
|
|
|
#include "flow/IRandom.h"
|
|
|
|
#include <vector>
|
|
|
|
#include <algorithm>
|
|
|
|
+#include <cmath>
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
class ContinuousSample {
|
|
|
|
diff --git a/fdbrpc/Smoother.h b/fdbrpc/Smoother.h
|
2020-10-11 15:25:28 +02:00
|
|
|
index 3ed8e6e98..fb4694750 100644
|
2020-01-18 16:41:59 +01:00
|
|
|
--- a/fdbrpc/Smoother.h
|
|
|
|
+++ b/fdbrpc/Smoother.h
|
|
|
|
@@ -23,6 +23,7 @@
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "flow/flow.h"
|
|
|
|
+#include <cmath>
|
|
|
|
|
|
|
|
struct Smoother {
|
|
|
|
// Times (t) are expected to be nondecreasing
|
|
|
|
@@ -90,4 +91,4 @@ struct TimerSmoother {
|
|
|
|
double time, total, estimate;
|
|
|
|
};
|
|
|
|
|
|
|
|
-#endif
|
|
|
|
\ No newline at end of file
|
|
|
|
+#endif
|
|
|
|
diff --git a/fdbrpc/libcoroutine/Coro.c b/fdbrpc/libcoroutine/Coro.c
|
2020-10-11 15:25:28 +02:00
|
|
|
index cbfdc8fde..9993cee44 100644
|
2020-01-18 16:41:59 +01:00
|
|
|
--- a/fdbrpc/libcoroutine/Coro.c
|
|
|
|
+++ b/fdbrpc/libcoroutine/Coro.c
|
|
|
|
@@ -66,6 +66,8 @@ VALGRIND_STACK_DEREGISTER((coro)->valgrindStackId)
|
|
|
|
#define STACK_DEREGISTER(coro)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+#pragma GCC diagnostic ignored "-Wreturn-local-addr"
|
|
|
|
+
|
|
|
|
// Define outside
|
|
|
|
extern intptr_t g_stackYieldLimit;
|
|
|
|
|
|
|
|
diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp
|
2020-10-11 15:25:28 +02:00
|
|
|
index 819c513c6..acfbfe7db 100644
|
2020-01-18 16:41:59 +01:00
|
|
|
--- a/fdbserver/Knobs.cpp
|
|
|
|
+++ b/fdbserver/Knobs.cpp
|
|
|
|
@@ -20,6 +20,7 @@
|
|
|
|
|
|
|
|
#include "Knobs.h"
|
|
|
|
#include "fdbrpc/Locality.h"
|
|
|
|
+#include <cmath>
|
|
|
|
|
|
|
|
ServerKnobs const* SERVER_KNOBS = new ServerKnobs();
|
|
|
|
|
|
|
|
diff --git a/flow/Knobs.cpp b/flow/Knobs.cpp
|
2020-10-11 15:25:28 +02:00
|
|
|
index b485a8495..82541d439 100644
|
2020-01-18 16:41:59 +01:00
|
|
|
--- a/flow/Knobs.cpp
|
|
|
|
+++ b/flow/Knobs.cpp
|
|
|
|
@@ -20,6 +20,7 @@
|
|
|
|
|
|
|
|
#include "Knobs.h"
|
|
|
|
#include "flow/flow.h"
|
|
|
|
+#include <cmath>
|
|
|
|
|
|
|
|
FlowKnobs const* FLOW_KNOBS = new FlowKnobs();
|
|
|
|
|
|
|
|
diff --git a/flow/Platform.cpp b/flow/Platform.cpp
|
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)) {
^
2020-10-11 15:32:17 +02:00
|
|
|
index 69dac889a..62bda9edb 100644
|
2020-01-18 16:41:59 +01:00
|
|
|
--- a/flow/Platform.cpp
|
|
|
|
+++ b/flow/Platform.cpp
|
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)) {
^
2020-10-11 15:32:17 +02:00
|
|
|
@@ -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
|
2020-01-18 16:41:59 +01:00
|
|
|
unsigned int minorId;
|
|
|
|
disk_stream >> majorId;
|
|
|
|
disk_stream >> minorId;
|
|
|
|
- if(majorId == (unsigned int) major(buf.st_dev) && minorId == (unsigned int) minor(buf.st_dev)) {
|
|
|
|
+ if(majorId == (unsigned int) gnu_dev_major(buf.st_dev) && minorId == (unsigned int) gnu_dev_minor(buf.st_dev)) {
|
|
|
|
std::string ignore;
|
|
|
|
uint64_t rd_ios; /* # of reads completed */
|
|
|
|
// This is the total number of reads completed successfully.
|
2020-10-11 18:07:08 +02:00
|
|
|
diff --git a/flow/Profiler.actor.cpp b/flow/Profiler.actor.cpp
|
|
|
|
index 27af613e6..69f38c237 100644
|
|
|
|
--- a/flow/Profiler.actor.cpp
|
|
|
|
+++ b/flow/Profiler.actor.cpp
|
|
|
|
@@ -35,8 +35,6 @@
|
|
|
|
|
|
|
|
extern volatile int profilingEnabled;
|
|
|
|
|
|
|
|
-static uint64_t gettid() { return syscall(__NR_gettid); }
|
|
|
|
-
|
|
|
|
struct SignalClosure {
|
|
|
|
void (* func)(int, siginfo_t*, void*, void*);
|
|
|
|
void *userdata;
|
2020-01-18 16:41:59 +01:00
|
|
|
diff --git a/flow/TDMetric.actor.h b/flow/TDMetric.actor.h
|
2020-10-11 15:25:28 +02:00
|
|
|
index 5421b83b5..711a96093 100755
|
2020-01-18 16:41:59 +01:00
|
|
|
--- a/flow/TDMetric.actor.h
|
|
|
|
+++ b/flow/TDMetric.actor.h
|
|
|
|
@@ -36,6 +36,7 @@
|
|
|
|
#include "CompressedInt.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <functional>
|
|
|
|
+#include <cmath>
|
|
|
|
|
|
|
|
struct MetricNameRef {
|
|
|
|
MetricNameRef() {}
|
|
|
|
diff --git a/flow/flow.h b/flow/flow.h
|
2020-10-11 15:25:28 +02:00
|
|
|
index 0c220afae..f685fbc63 100644
|
2020-01-18 16:41:59 +01:00
|
|
|
--- a/flow/flow.h
|
|
|
|
+++ b/flow/flow.h
|
|
|
|
@@ -248,19 +248,6 @@ public:
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- bool operator == (ErrorOr const& o) const {
|
|
|
|
- return error == o.error && (!present() || get() == o.get());
|
|
|
|
- }
|
|
|
|
- bool operator != (ErrorOr const& o) const {
|
|
|
|
- return !(*this == o);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- bool operator < (ErrorOr const& o) const {
|
|
|
|
- if (error != o.error) return error < o.error;
|
|
|
|
- if (!present()) return false;
|
|
|
|
- return get() < o.get();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
bool isError() const { return error.code() != invalid_error_code; }
|
|
|
|
bool isError(int code) const { return error.code() == code; }
|
|
|
|
Error getError() const { ASSERT(isError()); return error; }
|