From 1224cd9d254c5e7e329c19612922dba1fa5db185 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Mon, 2 Jan 2023 13:06:39 +0100 Subject: [PATCH] - Fix windows compile for libunbound subprocess reap comm point closes. --- doc/Changelog | 3 +++ libunbound/libunbound.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index b14cf1d55..cd225c523 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +2 January 2023: Wouter + - Fix windows compile for libunbound subprocess reap comm point closes. + 14 December 2022: George - Merge #569 from JINMEI Tatuya: add keep-cache option to 'unbound-control reload' to keep caches. diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c index 225457e73..80a82bb47 100644 --- a/libunbound/libunbound.c +++ b/libunbound/libunbound.c @@ -311,6 +311,7 @@ ub_ctx_delete(struct ub_ctx* ctx) * it and only one should clean up, the one with getpid == pipe_pid.*/ if(ctx->created_bg && ctx->pipe_pid != getpid()) { do_stop = 0; +#ifndef USE_WINSOCK /* Stop events from getting deregistered, if the backend is * epoll, the epoll fd is the same as the other process. * That process should deregister them. */ @@ -322,6 +323,7 @@ ub_ctx_delete(struct ub_ctx* ctx) ctx->rr_pipe->listen_com->event_added = 0; if(ctx->rr_pipe->res_com) ctx->rr_pipe->res_com->event_added = 0; +#endif } /* see if bg thread is created and if threads have been killed */ /* no locks, because those may be held by terminated threads */