浏览代码

add a note explaining the weird h_errno definition

Mike Frysinger 20 年之前
父节点
当前提交
aceb53ffab
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      include/netdb.h

+ 3 - 1
include/netdb.h

@@ -54,7 +54,9 @@
 __BEGIN_DECLS
 
 /* Error status for non-reentrant lookup functions.
-   We use a macro to access always the thread-specific `h_errno' variable.  */
+   We use a macro to access always the thread-specific `h_errno' variable.
+   We always need the extern int here in case internal libc code undefines 
+   the macro because it needs access to the underlying storage. */
 extern int h_errno;
 #if defined(__UCLIBC_HAS_THREADS__)
 # define h_errno (*__h_errno_location ())