Skip to content

Commit ed84387

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f924b52 commit ed84387

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compat/win32/pthread.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ static inline void *pthread_getspecific(pthread_key_t key)
101101
return TlsGetValue(key);
102102
}
103103

104+
#ifndef __MINGW64_VERSION_MAJOR
104105
static inline int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
105106
{
106107
return 0;
107108
}
109+
#endif
108110

109111
#endif /* PTHREAD_H */

0 commit comments

Comments
 (0)