diff options
author | John Coyle <dx9err@gmail.com> | 2016-06-24 19:49:42 +0200 |
---|---|---|
committer | John Coyle <dx9err@gmail.com> | 2016-07-04 17:19:51 +0200 |
commit | 3ba630636de437f7c5b69e620b7e3275eb5ab0a2 (patch) | |
tree | 960b837a5e416aadca1f96c8fbc9c93d340b44f1 /src/global/signal_handler.cc | |
parent | Merge pull request #9207 from rjfd/wip-15670 (diff) | |
download | ceph-3ba630636de437f7c5b69e620b7e3275eb5ab0a2.tar.xz ceph-3ba630636de437f7c5b69e620b7e3275eb5ab0a2.zip |
compat: add abstractions for non portable pthread name funcs
Supports GNU, FreeBSD, OSX, and Alpine.
Signed-off-by: John Coyle <dx9err@gmail.com>
Diffstat (limited to 'src/global/signal_handler.cc')
-rw-r--r-- | src/global/signal_handler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/global/signal_handler.cc b/src/global/signal_handler.cc index a01a78a868a..5b65065cdc6 100644 --- a/src/global/signal_handler.cc +++ b/src/global/signal_handler.cc @@ -12,6 +12,8 @@ * */ +#include "include/compat.h" + #include "common/BackTrace.h" #include "common/debug.h" #include "global/pidfile.h" @@ -90,10 +92,8 @@ static void handle_fatal_signal(int signum) // presumably dump core-- will handle it. char buf[1024]; char pthread_name[16] = {0}; //limited by 16B include terminating null byte. -#if !defined(__FreeBSD__) int r = pthread_getname_np(pthread_self(), pthread_name, sizeof(pthread_name)); (void)r; -#endif #if defined(__sun) char message[SIG2STR_MAX]; sig2str(signum,message); |