1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-05 19:35:52 +03:00

resolv: Move __res_context_hostalias into its own file and into libc

And reformat it to GNU style.  Remove the unecessary setbuf call.
Use __fgets_unlocked for PLT avoidance; no locking is required here.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Florian Weimer
2021-07-19 07:55:27 +02:00
parent 7131727c6b
commit be5773e166
5 changed files with 135 additions and 42 deletions

View File

@@ -79,7 +79,7 @@ int __res_context_send (struct resolv_context *, const unsigned char *, int,
/* Internal function similar to res_hostalias. */
const char *__res_context_hostalias (struct resolv_context *,
const char *, char *, size_t);
libresolv_hidden_proto (__res_context_hostalias);
libc_hidden_proto (__res_context_hostalias);
/* Add an OPT record to a DNS query. */
int __res_nopt (struct resolv_context *, int n0,