Don't warn if pthread_atfork isn't avaliable on MSVC
authorOrvid King <blah38621@gmail.com>
Wed, 12 Aug 2015 20:40:33 +0000 (13:40 -0700)
committerfacebook-github-bot-9 <folly-bot@fb.com>
Wed, 12 Aug 2015 21:20:48 +0000 (14:20 -0700)
Summary: Because we don't even have `fork` to begin with under MSVC.
Closes #278

Reviewed By: @yfeldblum

Differential Revision: D2306518

Pulled By: @sgolemon

folly/detail/ThreadLocalDetail.h

index c5fb61e4001cc664227a8adbe662e2f0167a656d..bd8658cfc3a0721e764a1bca90a2b55859d970e7 100644 (file)
@@ -212,7 +212,7 @@ struct StaticMeta {
                          /*parent*/ &StaticMeta::onForkParent,
                          /*child*/ &StaticMeta::onForkChild);
     checkPosixError(ret, "pthread_atfork failed");
-#elif !__ANDROID__
+#elif !__ANDROID__ && !defined(_MSC_VER)
     // pthread_atfork is not part of the Android NDK at least as of n9d. If
     // something is trying to call native fork() directly at all with Android's
     // process management model, this is probably the least of the problems.