Browse Source

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>
maint
Johannes Schindelin 9 years ago committed by Junio C Hamano
parent
commit
ed84387a6b
  1. 2
      compat/win32/pthread.h

2
compat/win32/pthread.h

@ -101,9 +101,11 @@ static inline void *pthread_getspecific(pthread_key_t key) @@ -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 */

Loading…
Cancel
Save