res_state and res_init definition order in resolv.c

Sørensen, Kenneth Kenneth.Sorensen at
Fri Aug 9 11:12:18 UTC 2013

Hi Bernhard

While you are looking into this issue will you please take my suggested patches into consideration?
This one specifically addresses the issue described below.
This one makes res_init() thread safe.
Please see my explanation in the mail.

Thank you for your time.

From: uclibc-bounces at <uclibc-bounces at> on behalf of Bernhard Reutner-Fischer < at>
Sent: Monday, July 15, 2013 11:41
To: Eugene Rudoy; uclibc at
Subject: Re: res_state and res_init definition order in resolv.c

On 13 July 2013 13:17:25 Eugene Rudoy <gene.devel at> wrote:
> Hi all,
> could someone who is familiar with resolv.c and understands all its res_init
> related tricks please comment the following two commits:
> [1] "resolv.c: add support for per thread
> res_state"<>.
> Note
> the comment it contains "This needs to be after the use of _res in
> res_init, above."
> and
> [2] "inet/resolv: add res_ninit and
> res_nclose"<>.
> This
> moves res_init after the definition of _res/__resp without modifying the
> comment from [1] and without explaining whether it still applies or not.
> The question arises in the context of understanding whether the patch
> provided in OpenWRT ticket 11929 <> is
> a correct one and why it works for some people and doesn't work for the
> other ones.

I will have a look.

Sent with AquaMail for Android

uClibc mailing list
uClibc at

More information about the uClibc mailing list