mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
render: use portable HAS_INCLUDE() wrapper instead of __has_include()
This commit is contained in:
parent
79e054faff
commit
e19db15104
2 changed files with 9 additions and 1 deletions
6
macros.h
6
macros.h
|
|
@ -27,6 +27,12 @@
|
|||
#define HAS_BUILTIN(x) 0
|
||||
#endif
|
||||
|
||||
#ifdef __has_include
|
||||
#define HAS_INCLUDE(x) __has_include(x)
|
||||
#else
|
||||
#define HAS_INCLUDE(x) 0
|
||||
#endif
|
||||
|
||||
#ifdef __has_feature
|
||||
#define HAS_FEATURE(x) __has_feature(x)
|
||||
#else
|
||||
|
|
|
|||
4
render.c
4
render.c
|
|
@ -9,7 +9,9 @@
|
|||
#include <sys/timerfd.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <pthread.h>
|
||||
#if __has_include(<pthread_np.h>)
|
||||
|
||||
#include "macros.h"
|
||||
#if HAS_INCLUDE(<pthread_np.h>)
|
||||
#include <pthread_np.h>
|
||||
#define pthread_setname_np(thread, name) (pthread_set_name_np(thread, name), 0)
|
||||
#elif defined(__NetBSD__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue