Commit 78a2dd96 authored by Emmanuele Bassi's avatar Emmanuele Bassi 👣

Merge branch 'threaded-resolver-freebsd' into 'master'

gthreadedresolver: Fix initialisation on FreeBSD

Closes #1697

See merge request !693
parents d7c93e3f 6e7e5fff
Pipeline #62569 passed with stages
in 19 minutes and 25 seconds
......@@ -940,8 +940,10 @@ do_lookup_records (GTask *task,
* 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 thread. (Although the workers would get reused by the
* #GThreadPool.) */
struct __res_state res;
* #GThreadPool.)
*
* FreeBSD requires the state to be zero-filled before calling res_ninit(). */
struct __res_state res = { 0, };
if (res_ninit (&res) != 0)
{
g_task_return_new_error (task, G_RESOLVER_ERROR, G_RESOLVER_ERROR_INTERNAL,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment