diff options
author | Jan Klötzke <jan.kloetzke@kernkonzept.com> | 2025-02-12 02:15:47 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2025-02-12 02:17:46 +0100 |
commit | f459ac62a904dd6e1cb909b3224df18e9acadbfb (patch) | |
tree | d5ad7cd3ebcceaca433c2fc7a93f941b97da6b33 /libc/inet/resolv.c | |
parent | 4e53564f45eef99883d4f3f20866f32dd9218d2d (diff) |
inet/resolv.c: set h_errnop if /etc/hosts cannot be opened
If gethostent_r fails, the h_errnop error code should be set.
Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
Diffstat (limited to 'libc/inet/resolv.c')
-rw-r--r-- | libc/inet/resolv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index d7a659a8c..130a9a505 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -2699,7 +2699,7 @@ int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen, hostp = __open_etc_hosts(); if (hostp == NULL) { *result = NULL; - ret = TRY_AGAIN; + *h_errnop = ret = TRY_AGAIN; goto DONE; } } |