Skip to content

Commit

Permalink
Work around OSX not supporting threads.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
insertinterestingnamehere committed Oct 1, 2024
1 parent 65879c6 commit a4ac8ee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/qt_macros.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
#ifndef QT_MACROS_H
#define QT_MACROS_H

// Work around OSX currently refusing to support threads.h
#if 201112L <= __STDC_VERSION__ && __STDC_VERSION__ < 202311L
#ifndef __STDC_NO_THREADS__
#include <threads.h>
#else
#define thread_local _Thread_local
#endif
#elif __STDC_VERSION__ < 201112L
#error "C11 is required"
#endif

#ifdef HAVE_CONFIG_H
#include <config.h>
Expand Down

0 comments on commit a4ac8ee

Please sign in to comment.