From: Orvid King Date: Wed, 12 Aug 2015 20:40:33 +0000 (-0700) Subject: Don't warn if pthread_atfork isn't avaliable on MSVC X-Git-Tag: v0.54.0~11 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=919d8e39757df6413a1d558f67774d1344f5dfd8;p=folly.git Don't warn if pthread_atfork isn't avaliable on MSVC Summary: Because we don't even have `fork` to begin with under MSVC. Closes #278 Reviewed By: @yfeldblum Differential Revision: D2306518 Pulled By: @sgolemon --- diff --git a/folly/detail/ThreadLocalDetail.h b/folly/detail/ThreadLocalDetail.h index c5fb61e4..bd8658cf 100644 --- a/folly/detail/ThreadLocalDetail.h +++ b/folly/detail/ThreadLocalDetail.h @@ -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.