Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Fri, 23 Oct 2020 13:08:25 -0400
From: Rich Felker <dalias@...c.org>
To: 纳兰融雪 <lidehu@...inggirl.net>
Cc: musl <musl@...ts.openwall.com>
Subject: Re: About the glibc libresolv vs musl network resolver
 routines signature

On Fri, Oct 23, 2020 at 05:25:44PM +0800, 纳兰融雪 wrote:
> I work with any third party code written with glic, and I need
> compile and run it in a musl runtime.The code use `res_ninit`, but I
> cloud not find it in musl's resolv.h file.I noticed that glibc use
> `res_ninit`, `res_nclose`, `res_nquery`, etc, and marked `res_init`,
> `res_query`, etc as deprecated, but musl still using the old
> signature.I'm wondering:- How do I compile the code that use the
> `res_ninit` routine signature?- Is there a standard for the sinature
> for `resolv.h` (/usr/include/resolv.h)?- Will musl will use the new
> `res_ninit` glibc current using or the `res_init` style still?

resolv.h defines the __RES version macro to indicate the API level
provided, and its meaning is consistent across different libcs. __RES
>= 19991006 indicates support for the res_n* functions. musl's
resolver is stateless and does not have them, and defines __RES
appropriately to indicate that it doesn't.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.