From: Wouter Wijngaards Date: Thu, 13 Aug 2015 15:06:01 +0000 (+0000) Subject: fix windows portability X-Git-Tag: release-1.5.5rc1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b68fcc28c498c8109e8d0ffcea4cb430bdcf5b0c;p=thirdparty%2Funbound.git fix windows portability git-svn-id: file:///svn/unbound/trunk@3474 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c index 7f034b8fe..a3a1d21a8 100644 --- a/libunbound/libunbound.c +++ b/libunbound/libunbound.c @@ -65,7 +65,9 @@ #ifdef HAVE_PTHREAD #include #endif +#ifdef HAVE_SYS_WAIT_H #include +#endif #if defined(UB_ON_WINDOWS) && defined (HAVE_WINDOWS_H) #include @@ -219,10 +221,12 @@ static void ub_stop_bg(struct ub_ctx* ctx) ub_thread_join(ctx->bg_tid); } else { lock_basic_unlock(&ctx->cfglock); +#ifndef UB_ON_WINDOWS if(waitpid(ctx->bg_pid, NULL, 0) == -1) { if(verbosity > 2) log_err("waitpid: %s", strerror(errno)); } +#endif } } else {