use __attribute__((const)) for errno and pthread_self if __GNUC__ is defined
[musl] / include / errno.h
index d9c2c9c..9d68033 100644 (file)
@@ -7,6 +7,9 @@ extern "C" {
 
 #include <bits/errno.h>
 
+#ifdef __GNUC__
+__attribute__((const))
+#endif
 extern int *__errno_location(void);
 #define errno (*__errno_location())