Conditionally use pthread_setname_np (#27540)

* Conditionally use pthread_setname_np

Fixes #27437.

* pthread_setname_np is on 2.12, not 2.11.
pull/27921/head
Nicolas Noble 3 years ago committed by GitHub
parent ad7e00f57a
commit 826b888e75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      include/grpc/impl/codegen/port_platform.h

@ -186,7 +186,14 @@
#endif /* _LP64 */
#ifdef __GLIBC__
#define GPR_POSIX_CRASH_HANDLER 1
#ifdef __GLIBC_PREREQ
#if __GLIBC_PREREQ(2, 12)
#define GPR_LINUX_PTHREAD_NAME 1
#endif
#else
// musl libc & others
#define GPR_LINUX_PTHREAD_NAME 1
#endif
#include <linux/version.h>
#else /* musl libc */
#define GPR_MUSL_LIBC_COMPAT 1

Loading…
Cancel
Save