-// This looks a bit weird, but it's necessary to avoid
-// having an undefined compiler function called.
-#if defined(__GLIBC__) && !defined(__APPLE__) && !defined(__ANDROID__)
-#if __GLIBC_PREREQ(2, 12)
-// has pthread_setname_np(pthread_t, const char*) (2 params)
-#define FOLLY_HAS_PTHREAD_SETNAME_NP_THREAD_NAME 1
-#endif
-#endif
-#if defined(__APPLE__) && defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
-// has pthread_setname_np(const char*) (1 param)
-#define FOLLY_HAS_PTHREAD_SETNAME_NP_NAME 1
-#endif
-#endif
-
-template <typename T>
-inline bool setThreadName(T /* id */, StringPiece /* name */) {
- static_assert(
- std::is_same<T, pthread_t>::value ||
- std::is_same<T, std::thread::id>::value ||
- std::is_same<T, std::thread::native_handle_type>::value,
- "type must be pthread_t, std::thread::id or "
- "std::thread::native_handle_type");
- return false;
-}