mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
LibC: Make h_errno thread-local
This commit is contained in:
committed by
Andreas Kling
parent
0aee2abda7
commit
bc18fa75ec
@@ -19,7 +19,11 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
#ifdef NO_TLS
|
||||
int h_errno;
|
||||
#else
|
||||
__thread int h_errno;
|
||||
#endif
|
||||
|
||||
static hostent __gethostbyname_buffer;
|
||||
static in_addr_t __gethostbyname_address;
|
||||
|
||||
@@ -48,7 +48,11 @@ struct protoent* getprotobynumber(int proto);
|
||||
struct protoent* getprotoent(void);
|
||||
void setprotoent(int stay_open);
|
||||
|
||||
#ifdef NO_TLS
|
||||
extern int h_errno;
|
||||
#else
|
||||
extern __thread int h_errno;
|
||||
#endif
|
||||
|
||||
#define HOST_NOT_FOUND 101
|
||||
#define NO_DATA 102
|
||||
|
||||
Reference in New Issue
Block a user