diff options
-rw-r--r-- | src/maybe_threads.cc | 6 | ||||
-rw-r--r-- | src/windows/mingw.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/maybe_threads.cc b/src/maybe_threads.cc index acfc99a..ef7e582 100644 --- a/src/maybe_threads.cc +++ b/src/maybe_threads.cc @@ -69,10 +69,12 @@ extern "C" { __THROW ATTRIBUTE_WEAK; int pthread_once(pthread_once_t *, void (*)(void)) ATTRIBUTE_WEAK; +#ifdef HAVE_FORK int pthread_atfork(void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) __THROW ATTRIBUTE_WEAK; +#endif } #define MAX_PERTHREAD_VALS 16 @@ -161,6 +163,8 @@ int perftools_pthread_once(pthread_once_t *ctl, } } +#ifdef HAVE_FORK + void perftools_pthread_atfork(void (*before)(), void (*parent_after)(), void (*child_after)()) { @@ -169,3 +173,5 @@ void perftools_pthread_atfork(void (*before)(), CHECK(rv == 0); } } + +#endif diff --git a/src/windows/mingw.h b/src/windows/mingw.h index 0586e62..c91a313 100644 --- a/src/windows/mingw.h +++ b/src/windows/mingw.h @@ -63,6 +63,8 @@ #undef HAVE_PTHREAD #endif +#undef HAVE_FORK + #define HAVE_PID_T #include "windows/port.h" |