diff options
Diffstat (limited to 'resolv')
-rw-r--r-- | resolv/netdb.h | 11 | ||||
-rw-r--r-- | resolv/res_query.c | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/resolv/netdb.h b/resolv/netdb.h index cca3060..1269443 100644 --- a/resolv/netdb.h +++ b/resolv/netdb.h @@ -43,6 +43,17 @@ __BEGIN_DECLS /* Error status for non-reentrant lookup functions. */ extern int h_errno; +#if defined __USE_REENTRANT && (!defined _LIBC || defined _LIBC_REENTRANT) +/* Function to access thread specific `h_errno' variable. */ +extern int *__h_errno_location __P ((void)) __attribute__ ((__const__)); + +/* An alias name for above variable. */ +extern int __h_errno; + +/* Use a macro to access always the thread specific `h_errno' variable. */ +#define h_errno (*__h_errno_location ()) +#endif + /* Possible values left in `h_errno'. */ #define NETDB_INTERNAL -1 /* See errno. */ #define NETDB_SUCCESS 0 /* No problem. */ diff --git a/resolv/res_query.c b/resolv/res_query.c index 7ee6be7..135c6aa 100644 --- a/resolv/res_query.c +++ b/resolv/res_query.c @@ -87,7 +87,7 @@ static char rcsid[] = "$Id$"; #endif char *__hostalias __P((const char *)); -int h_errno; + /* * Formulate a normal query, send, and await answer. |