1 /* Compatibility functions for obsolete libresolv hooks.
2    Copyright (C) 1999-2022 Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
4 
5    The GNU C Library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public
7    License as published by the Free Software Foundation; either
8    version 2.1 of the License, or (at your option) any later version.
9 
10    The GNU C Library is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
14 
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library; if not, see
17    <https://www.gnu.org/licenses/>.  */
18 
19 /*
20  * Copyright (c) 1995-1999 by Internet Software Consortium.
21  *
22  * Permission to use, copy, modify, and distribute this software for any
23  * purpose with or without fee is hereby granted, provided that the above
24  * copyright notice and this permission notice appear in all copies.
25  *
26  * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
27  * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
28  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
29  * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
30  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
31  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
32  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
33  * SOFTWARE.
34  */
35 
36 #include <resolv.h>
37 
38 #include <shlib-compat.h>
39 
40 #if SHLIB_COMPAT (libresolv, GLIBC_2_0, GLIBC_2_25)
41 
42 void
43 attribute_compat_text_section
res_send_setqhook(void * hook)44 res_send_setqhook(void *hook) {
45   _res.__glibc_unused_qhook = hook;
46 }
47 compat_symbol (libresolv, res_send_setqhook, res_send_setqhook, GLIBC_2_0);
48 
49 void
50 attribute_compat_text_section
res_send_setrhook(void * hook)51 res_send_setrhook(void *hook) {
52   _res.__glibc_unused_rhook = hook;
53 }
54 compat_symbol (libresolv, res_send_setrhook, res_send_setrhook, GLIBC_2_0);
55 
56 #endif
57