iphlpapi: Only call res_init() once per process

Hans Leidekker hans at it.vu.nl
Wed Apr 18 13:39:33 CDT 2007


On Wednesday 18 April 2007 17:29:10 Jason Green wrote:

> Original author: Mark Adams, TransGaming Technologies.
>
> Mac OSX 10.4 has a nasty bug in its res_init() implementation where if
> you call it more than once per process, it closes fd 0 on you.  This
> only needs to be called once per process anyway, so we'll move it to
> the ATTACH_PROCESS section.

res_init() is only needed by a couple of functions, so calling it
unconditionally seems like overkill. This patch calls it only if needed
and also fixes the other places where we call res_init().

 -Hans

Changelog
 Only call res_init() once per process.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: iphlpapi_01.diff
Type: text/x-diff
Size: 2295 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070418/a920d4d5/iphlpapi_01.bin


More information about the wine-patches mailing list