From f8d0ea96413b24c68d569235f7e4d3e8081e90c2 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Mon, 2 Feb 2004 23:34:21 +0000 Subject: [PATCH] Fix the h_errno issue of this thread-safe global variable, thanks to Thread Local Storage. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6470 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/netdb.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/headers/posix/netdb.h b/headers/posix/netdb.h index 0693a217fc..0925cc54d8 100644 --- a/headers/posix/netdb.h +++ b/headers/posix/netdb.h @@ -20,10 +20,9 @@ extern "C" { #define NO_RECOVERY 3 #define NO_DATA 4 -#ifndef h_errno +// Make h_errno thread-safe extern int *_h_errnop(void); -#define h_errno (*_h_errnop()) -#endif /* h_errno */ +#define h_errno (*(_h_errnop())) struct hostent { char *h_name;