use __attribute__((const)) for errno and pthread_self if __GNUC__ is defined
[musl] / include / pthread.h
index 5d97ebf..a0af20f 100644 (file)
@@ -76,6 +76,9 @@ int pthread_detach(pthread_t);
 void pthread_exit(void *);
 int pthread_join(pthread_t, void **);
 
+#ifdef __GNUC__
+__attribute__((const))
+#endif
 pthread_t pthread_self(void);
 int pthread_equal(pthread_t, pthread_t);