From 450de176cf6cedd7d331406cd3f4315b2fbf5d1b Mon Sep 17 00:00:00 2001 From: Raphael Borun Das Gupta Date: Sun, 11 Oct 2020 18:07:08 +0200 Subject: [PATCH] foundationdb: fix build: use glibc's gettid() to avoid build error due to conflicting declaration: flow/Profiler.actor.cpp: In function 'uint64_t gettid()': flow/Profiler.actor.cpp:56:17: error: ambiguating new declaration of 'uint64_t gettid()' FILE* f; ^ In file included from /nix/store/4wy9j24psf9ny4di3anjs7yk2fvfb0gq-glibc-2.31-dev/include/unistd.h:1170:0, from ./flow/Platform.h:49, from ./flow/flow.h:40, from flow/Profiler.actor.cpp:39: /nix/store/4wy9j24psf9ny4di3anjs7yk2fvfb0gq-glibc-2.31-dev/include/bits/unistd_ext.h:34:16: note: old declaration '__pid_t gettid()' extern __pid_t gettid (void) __THROW; ^~~~~~ --- pkgs/servers/foundationdb/patches/gcc-fixes.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/servers/foundationdb/patches/gcc-fixes.patch b/pkgs/servers/foundationdb/patches/gcc-fixes.patch index 7e591dd55f5..a5c77d463fb 100644 --- a/pkgs/servers/foundationdb/patches/gcc-fixes.patch +++ b/pkgs/servers/foundationdb/patches/gcc-fixes.patch @@ -87,6 +87,19 @@ index 69dac889a..62bda9edb 100644 std::string ignore; uint64_t rd_ios; /* # of reads completed */ // This is the total number of reads completed successfully. +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; diff --git a/flow/TDMetric.actor.h b/flow/TDMetric.actor.h index 5421b83b5..711a96093 100755 --- a/flow/TDMetric.actor.h