mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-10 04:45:48 +01:00
Merge branch 'threaded-resolver-freebsd' into 'master'
gthreadedresolver: Fix initialisation on FreeBSD Closes #1697 See merge request GNOME/glib!693
This commit is contained in:
commit
78a2dd9632
@ -940,8 +940,10 @@ do_lookup_records (GTask *task,
|
|||||||
* What we have currently is not particularly worse than using res_query() in
|
* What we have currently is not particularly worse than using res_query() in
|
||||||
* worker threads, since it would transparently call res_init() for each new
|
* worker threads, since it would transparently call res_init() for each new
|
||||||
* worker thread. (Although the workers would get reused by the
|
* worker thread. (Although the workers would get reused by the
|
||||||
* #GThreadPool.) */
|
* #GThreadPool.)
|
||||||
struct __res_state res;
|
*
|
||||||
|
* FreeBSD requires the state to be zero-filled before calling res_ninit(). */
|
||||||
|
struct __res_state res = { 0, };
|
||||||
if (res_ninit (&res) != 0)
|
if (res_ninit (&res) != 0)
|
||||||
{
|
{
|
||||||
g_task_return_new_error (task, G_RESOLVER_ERROR, G_RESOLVER_ERROR_INTERNAL,
|
g_task_return_new_error (task, G_RESOLVER_ERROR, G_RESOLVER_ERROR_INTERNAL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user