mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 04:40:07 +01:00
Fix check for InitOnceComplete failure
...also include <windows.h>
Fixes ff4f2f43
This commit is contained in:
parent
0bf0265009
commit
76a0978d7b
1 changed files with 3 additions and 1 deletions
|
|
@ -486,6 +486,8 @@ _cairo_atomic_ptr_cmpxchg_return_old_fallback(cairo_atomic_intptr_t *x, void *ol
|
|||
|
||||
#if defined (_WIN32)
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
typedef INIT_ONCE cairo_atomic_once_t;
|
||||
#define CAIRO_ATOMIC_ONCE_INIT INIT_ONCE_STATIC_INIT
|
||||
|
||||
|
|
@ -507,7 +509,7 @@ _cairo_atomic_init_once_enter(cairo_atomic_once_t *once)
|
|||
static cairo_always_inline void
|
||||
_cairo_atomic_init_once_leave(cairo_atomic_once_t *once)
|
||||
{
|
||||
if (unlikely (InitOnceComplete (once, 0, NULL))) {
|
||||
if (unlikely (!InitOnceComplete (once, 0, NULL))) {
|
||||
assert (0 && "InitOnceComplete failed");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue