From: W.C.A. Wijngaards Date: Tue, 10 Mar 2020 08:22:02 +0000 (+0100) Subject: * Fix #92: ldns-testns.c:429:15: error: 'fork' is unavailable: not X-Git-Tag: 1.8.0-rc.1~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43c798b56967b909513e5605886fe858a1da17a6;p=thirdparty%2Fldns.git * Fix #92: ldns-testns.c:429:15: error: 'fork' is unavailable: not available on tvOS. --- diff --git a/Changelog b/Changelog index a557b103..706d2b6b 100644 --- a/Changelog +++ b/Changelog @@ -9,6 +9,8 @@ * Fix memory leak in examples/ldns-testns handle_tcp routine. * Detect fixed time memory compare for openssl 0.9.8. * Fix compile warning by variable initialisation for older gcc. + * Fix #92: ldns-testns.c:429:15: error: 'fork' is unavailable: not + available on tvOS. 1.7.1 2019-07-26 * bugfix: Manage verification paths for OpenSSL >= 1.1.0 diff --git a/configure.ac b/configure.ac index 28d8ed37..ab885d2b 100644 --- a/configure.ac +++ b/configure.ac @@ -860,6 +860,16 @@ AC_REPLACE_FUNCS(snprintf) AC_REPLACE_FUNCS(strlcpy) AC_REPLACE_FUNCS(memmove) AC_FUNC_FORK +AC_MSG_CHECKING([compile of fork]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ +#include +], [ + (void)fork(); +])], [ + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_FORK_AVAILABLE], 1, [if fork is available for compile]) +], [ AC_MSG_RESULT(no) +]) AC_CHECK_FUNCS([endprotoent endservent sleep random fcntl strtoul bzero memset b32_ntop b32_pton]) if test "x$HAVE_B32_NTOP" = "xyes"; then AC_SUBST(ldns_build_config_have_b32_ntop, 1) diff --git a/examples/ldns-testns.c b/examples/ldns-testns.c index b5d6dd47..a44ad74d 100644 --- a/examples/ldns-testns.c +++ b/examples/ldns-testns.c @@ -410,7 +410,7 @@ forkit(int number) int i; for(i=0; i