浏览代码

Do not include tls.h unless __UCLIBC_HAS_THREADS__ is defined.

Peter Kjellerstedt 18 年之前
父节点
当前提交
0a24932ab1
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      libc/sysdeps/linux/common/bits/uClibc_errno.h

+ 5 - 3
libc/sysdeps/linux/common/bits/uClibc_errno.h

@@ -31,10 +31,12 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__))
 	attribute_hidden
 # endif
 ;
-#include <tls.h>
-#if USE___THREAD
+# if defined __UCLIBC_HAS_THREADS__
+#  include <tls.h>
+#  if USE___THREAD
 libc_hidden_proto(__errno_location)
-#endif
+#  endif
+# endif
 
 /* We now need a declaration of the `errno' variable.  */
 # ifndef __UCLIBC_HAS_THREADS__