[Issue 14617] PTHREAD_MUTEX_INITIALIZER does not work on OSX
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat May 23 10:55:57 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14617
--- Comment #4 from Andrei Alexandrescu <andrei at erdani.com> ---
Thanks for all this, folks! Steve, can't you just insert the proper defaults
where the struct is defined? I.e. we have in src/core/sys/posix/sys/types.d the
following definition at line 594:
struct pthread_mutex_t
{
c_long __sig;
byte[__PTHREAD_MUTEX_SIZE__] __opaque;
}
Changing it to the following makes at least my tests pass:
struct pthread_mutex_t
{
c_long __sig = 0x32AAABA7;
byte[__PTHREAD_MUTEX_SIZE__] __opaque;
}
--
More information about the Digitalmars-d-bugs
mailing list