mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
LibC: Make h_errno thread-local
This commit is contained in:
parent
0aee2abda7
commit
bc18fa75ec
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue