From 6a7b70f8da1bc06d188aa2e67449a651a16ff5b5 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Tue, 2 May 2017 10:31:18 -0700 Subject: [PATCH] Fix the CMake build on Windows when using PThreads Summary: I broke things, so now I have to fix them. Reviewed By: yfeldblum Differential Revision: D4981674 fbshipit-source-id: 7df4d78cf4f984df158051a3a8b277a0bcad583b --- CMake/folly-config.h.cmake | 2 +- folly/ThreadName.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMake/folly-config.h.cmake b/CMake/folly-config.h.cmake index 7841aa08..1cefa401 100755 --- a/CMake/folly-config.h.cmake +++ b/CMake/folly-config.h.cmake @@ -16,7 +16,7 @@ #pragma once -#cmakedefine FOLLY_HAVE_PTHREAD +#cmakedefine FOLLY_HAVE_PTHREAD 1 #define FOLLY_HAVE_LIBGFLAGS 1 #define FOLLY_UNUSUAL_GFLAGS_NAMESPACE 1 diff --git a/folly/ThreadName.cpp b/folly/ThreadName.cpp index acd6163f..3e2d9aab 100644 --- a/folly/ThreadName.cpp +++ b/folly/ThreadName.cpp @@ -58,7 +58,7 @@ bool canSetOtherThreadName() { } bool setThreadName(std::thread::id tid, StringPiece name) { -#if !FOLLY_HAVE_PTHREAD +#if !FOLLY_HAVE_PTHREAD || _WIN32 return false; #else static_assert( -- 2.34.1