[uClibc]struct __res_state _res in resolver

Axel Barnitzke barney at xkontor.com
Mon Apr 15 08:07:26 UTC 2002


Hi Eric, hi bytecrunshers,

I have a request for inserting struct __res_state _res in resolv.c.
I needed that desperately for compiling libqte-2.3.2 and in fact
the qtopia desktop from trolltech under uclibc whithout making any
changes to their sources.


idea:

I use the given resolve.c and add a minimal res_init/res_state/res_close
functionality. I don't use the full __res_state structure because it
  seems to be to big. Instead I use a __res_state pointer and everybody
who needs the structure gets an unref to the at runtime allocated
structure. I fill in the minimum necessary fields and just make
references to the already allocated 'nameserver' and  'searchdomain' arrays.
So everybody who needs this gets a dynamically allocated structure with
the most important fields set up. And everybody who doesn't need that
gets some more lines of code.

Any suggestions?

   -- Barney
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: resolv.c.diff
Url: http://lists.busybox.net/pipermail/uclibc/attachments/20020415/6dfd7ee4/attachment.diff 


More information about the uClibc mailing list