diff --git a/headers/posix/netdb.h b/headers/posix/netdb.h index 26cb35e389..0693a217fc 100644 --- a/headers/posix/netdb.h +++ b/headers/posix/netdb.h @@ -21,7 +21,6 @@ extern "C" { #define NO_DATA 4 #ifndef h_errno -extern int h_errno; extern int *_h_errnop(void); #define h_errno (*_h_errnop()) #endif /* h_errno */ diff --git a/src/kits/network/libnet/compat.c b/src/kits/network/libnet/compat.c index 6a51d857bb..939110fea8 100644 --- a/src/kits/network/libnet/compat.c +++ b/src/kits/network/libnet/compat.c @@ -13,6 +13,7 @@ #include +extern int h_errno; #undef h_errno // was defined by netdb.h static int32 h_errno_tls; diff --git a/src/kits/network/libnet/getaddrinfo.c b/src/kits/network/libnet/getaddrinfo.c index 1e01ba4a26..73ed708fe2 100644 --- a/src/kits/network/libnet/getaddrinfo.c +++ b/src/kits/network/libnet/getaddrinfo.c @@ -98,6 +98,7 @@ #undef h_errno // was defined by netdb.h +extern int h_errno; #ifdef YP #include @@ -1517,7 +1518,6 @@ _yp_getaddrinfo(name, pai) /* resolver logic */ extern const char *__hostalias (const char *); -extern int h_errno; extern int res_opt (int, u_char *, int, int); /* diff --git a/src/kits/network/libnet/getnameinfo.c b/src/kits/network/libnet/getnameinfo.c index 52abcb1bd9..386093fd04 100644 --- a/src/kits/network/libnet/getnameinfo.c +++ b/src/kits/network/libnet/getnameinfo.c @@ -54,6 +54,7 @@ #undef h_errno // was defined by netdb.h +extern int h_errno; static const struct afd { int a_af; diff --git a/src/kits/network/libnet/res_debug.c b/src/kits/network/libnet/res_debug.c index dc16b3b671..feea41ad7f 100644 --- a/src/kits/network/libnet/res_debug.c +++ b/src/kits/network/libnet/res_debug.c @@ -93,6 +93,7 @@ #undef h_errno // was defined by netdb.h +extern int h_errno; extern const char *_res_opcodes[]; extern const char *_res_resultcodes[]; diff --git a/src/kits/network/libnet/res_mkquery.c b/src/kits/network/libnet/res_mkquery.c index eca7749a45..6062f8fe6b 100644 --- a/src/kits/network/libnet/res_mkquery.c +++ b/src/kits/network/libnet/res_mkquery.c @@ -66,6 +66,7 @@ #undef h_errno // was defined by netdb.h +extern int h_errno; /* * Form all types of queries.