Skip to content

Commit a4ac8ee

Browse files
Work around OSX not supporting threads.h.
1 parent 65879c6 commit a4ac8ee

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: include/qt_macros.h

+9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
#ifndef QT_MACROS_H
22
#define QT_MACROS_H
33

4+
// Work around OSX currently refusing to support threads.h
5+
#if 201112L <= __STDC_VERSION__ && __STDC_VERSION__ < 202311L
6+
#ifndef __STDC_NO_THREADS__
47
#include <threads.h>
8+
#else
9+
#define thread_local _Thread_local
10+
#endif
11+
#elif __STDC_VERSION__ < 201112L
12+
#error "C11 is required"
13+
#endif
514

615
#ifdef HAVE_CONFIG_H
716
#include <config.h>

0 commit comments

Comments
 (0)