diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2016-06-09 18:21:35 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2016-07-15 19:46:54 +0100 |
commit | c7151401e09b677559b5f280c2b4e8b0b8d33a41 (patch) | |
tree | 0749f8e6c166a33f354b544513b169cad8c345f2 /include | |
parent | 7d8edbaee72969355dc3519b91671ff930e01b2e (diff) |
Disable use of weak in threads_posix.h on Cygwin
Weak doesn't work the same on PE/COFF as on ELF, they are only weak
references. Specifically, since nothing else pulls in the object which
contains pthread_mutexattr_init() (and coming from the C library, that is
the only thing that object contains), means that it ends up as 0
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/c11/threads_posix.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/c11/threads_posix.h b/include/c11/threads_posix.h index 61b7fabf63..43e803ee8d 100644 --- a/include/c11/threads_posix.h +++ b/include/c11/threads_posix.h @@ -184,7 +184,7 @@ mtx_destroy(mtx_t *mtx) * Thus the linker will be happy and things don't clash when building * with -O1 or greater. */ -#ifdef HAVE_FUNC_ATTRIBUTE_WEAK +#if defined(HAVE_FUNC_ATTRIBUTE_WEAK) && !defined(__CYGWIN__) __attribute__((weak)) int pthread_mutexattr_init(pthread_mutexattr_t *attr); |