Fix ThreadName.cpp on Windows
authorChristopher Dykes <cdykes@fb.com>
Fri, 23 Jun 2017 01:07:39 +0000 (18:07 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 23 Jun 2017 01:24:36 +0000 (18:24 -0700)
Summary: I failed to realize that this helper function also needs to be guarded on `!_WIN32`, because the assertions are false on Windows.

Reviewed By: ot, luciang

Differential Revision: D5304914

fbshipit-source-id: f2564cb2fcbfdc73a2529d4a41df2995748bc3f6

folly/ThreadName.cpp

index 6f31157..919a011 100644 (file)
@@ -42,7 +42,7 @@ namespace folly {
 
 namespace {
 
-#if FOLLY_HAVE_PTHREAD
+#if FOLLY_HAVE_PTHREAD && !_WIN32
 pthread_t stdTidToPthreadId(std::thread::id tid) {
   static_assert(
       std::is_same<pthread_t, std::thread::native_handle_type>::value,