summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2016-05-11 15:10:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-05-11 21:02:10 (GMT)
commited84387a6bfe271e9c1edd277bb6fad54c6a6f0b (patch)
tree7dff7631fc812c3068b342b5e8c49dd2d4791fea /compat
parentf924b52a7779038cee94151f0c1ee144652bccbe (diff)
downloadgit-ed84387a6bfe271e9c1edd277bb6fad54c6a6f0b.zip
git-ed84387a6bfe271e9c1edd277bb6fad54c6a6f0b.tar.gz
git-ed84387a6bfe271e9c1edd277bb6fad54c6a6f0b.tar.bz2
Windows: only add a no-op pthread_sigmask() when needed
In f924b52 (Windows: add pthread_sigmask() that does nothing, 2016-05-01), we introduced a no-op for Windows. However, this breaks building Git in Git for Windows' SDK because pthread_sigmask() is already a no-op there, #define'd in the pthread_signal.h header in /mingw64/x86_64-w64-mingw32/include/. Let's wrap the definition of pthread_sigmask() in a guard that skips it when compiling with MinGW-w64' headers. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/win32/pthread.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h
index e74157c..7eac560 100644
--- a/compat/win32/pthread.h
+++ b/compat/win32/pthread.h
@@ -101,9 +101,11 @@ static inline void *pthread_getspecific(pthread_key_t key)
return TlsGetValue(key);
}
+#ifndef __MINGW64_VERSION_MAJOR
static inline int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
{
return 0;
}
+#endif
#endif /* PTHREAD_H */