about summary refs log tree commit diff
path: root/resolv/resolv-deprecated.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-19 07:55:27 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-19 07:56:21 +0200
commit72a51ac647b2fc33a44434d3d125a844801609ae (patch)
tree7654bc554282d2f2e9c14a03a6639a241fa69b9e /resolv/resolv-deprecated.c
parent762a2b2d341a9d6a4ea088479616907c5b4e9a7b (diff)
downloadglibc-72a51ac647b2fc33a44434d3d125a844801609ae.tar.gz
glibc-72a51ac647b2fc33a44434d3d125a844801609ae.tar.xz
glibc-72a51ac647b2fc33a44434d3d125a844801609ae.zip
resolv: Move res_nameinquery to its own file and into libc
And reformat to GNU style.

This deprecated function is used in the implementation of the stub
resolver (for now).  Keep the public symbol in libresolv for now
(so that no new symbol version is needed), and add a forwarder to
libresolv.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'resolv/resolv-deprecated.c')
-rw-r--r--resolv/resolv-deprecated.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/resolv/resolv-deprecated.c b/resolv/resolv-deprecated.c
index d8344f8f39..0fe9e4fda6 100644
--- a/resolv/resolv-deprecated.c
+++ b/resolv/resolv-deprecated.c
@@ -27,6 +27,7 @@
    functions.  */
 
 #include <arpa/nameser.h>
+#include <resolv.h>
 
 int
 ns_makecanon (const char *src, char *dst, size_t dstsize)
@@ -39,3 +40,10 @@ ns_samename (const char *a, const char *b)
 {
   return __libc_ns_samename (a, b);
 }
+
+int
+res_nameinquery (const char *name, int type, int class,
+                 const unsigned char *buf, const unsigned char *eom)
+{
+  return __libc_res_nameinquery (name, type, class, buf, eom);
+}