summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/TSRM.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index b25e3db149..75553edabc 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -143,7 +143,11 @@ TSRM_API const char *tsrm_api_name(void);
# define TSRM_TLS __thread
#endif
-#if !defined(__has_attribute) || !__has_attribute(tls_model)
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+
+#if !__has_attribute(tls_model)
# define TSRM_TLS_MODEL_ATTR
#elif __PIC__
# define TSRM_TLS_MODEL_ATTR __attribute__((tls_model("initial-exec")))