authorgravatar for motiejus@jakstys.ltMotiejus Jakštys <motiejus@jakstys.lt> 2023-05-04 10:36:05+03:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-13 17:44:27-07:00
logb7e5a31d79098d38ab111ca318e52698f154d5d6
tree688649a03a2a628f32d97652ac29381a055c0ae4
parentb40943e253c079ec3de1b149dd2ef0ccc3da38a4

glibc patch: add a few dn_* functions

This is necessary to build glib.

1 files changed, 16 insertions(+), 9 deletions(-)

lib/libc/include/generic-glibc/resolv.h+16-9
......@@ -171,16 +171,20 @@ __END_DECLS
171171#define res_isourserver __res_isourserver
172172
173173/* In glibc 2.33 and earlier res_search, res_nsearch, res_query, res_nquery,
174 * res_querydomain, res_nquerydomain were #define'd to __res_search,
175 * __res_nsearch, etc. glibc 2.34 onwards removes the macros and exposes the
176 * symbols directly. New glibc exposes compat symbols with underscores for
177 * backwards compatibility. Applications linked to glibc 2.34+ are expected
178 * to use the non-underscored symbols.
174 * res_querydomain, res_nquerydomain, dn_skipname, dn_comp, dn_expand were
175 * #define'd to __res_search, __res_nsearch, etc. glibc 2.34 onwards removes
176 * the macros and exposes the symbols directly. New glibc exposes compat
177 * symbols with underscores for backwards compatibility. Applications linked to
178 * glibc 2.34+ are expected to use the non-underscored symbols.
179179 *
180 * It will be enough to bring the macros back when compiling against the older
181 * glibc versions.
180 * It is enough to bring the macros back when compiling against the older glibc
181 * versions.
182182 *
183 * See glibc commit ea9878ec271c791880fcbbe519d70c42f8113750.
183 * See glibc commits:
184 * - ea9878ec271c791880fcbbe519d70c42f8113750 res_*
185 * - 391e02236b931132c0e8b5ba4c3b087c2aaa1044 dn_skipname
186 * - fd8a87c0c1932de591e7ad108ff6288a4b6b18c9 dn_comp
187 * - 640bbdf71c6f10ac26252ac67a22902e26657bd8 dn_expand
184188 */
185189#if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 34)
186190#define res_search __res_search
......@@ -189,6 +193,9 @@ __END_DECLS
189193#define res_nquery __res_nquery
190194#define res_querydomain __res_querydomain
191195#define res_nquerydomain __res_nquerydomain
196#define dn_skipname __dn_skipname
197#define dn_comp __dn_comp
198#define dn_expand __dn_expand
192199#endif
193200/* end glibc compat hacks */
194201
......@@ -328,4 +335,4 @@ void res_nclose (res_state) __THROW;
328335
329336__END_DECLS
330337
331#endif /* !_RESOLV_H_ */
\ No newline at end of file
338#endif /* !_RESOLV_H_ */