From: Richard Levitte Date: Mon, 12 Nov 2018 17:16:27 +0000 (+0100) Subject: apps/ocsp.c Use the same HAVE_FORK / NO_FORK as in speed.c X-Git-Tag: OpenSSL_1_1_1b~38 X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=af250b36eb537bc2b185e35e24f187380a98ebb4 apps/ocsp.c Use the same HAVE_FORK / NO_FORK as in speed.c This allows the user to override our defaults if needed, and in a consistent manner. Partial fix for #7607 Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/7624) (cherry picked from commit ca811248d838058c13236a6c3b688e0ac98c02c8) --- diff --git a/apps/ocsp.c b/apps/ocsp.c index d38b4a1880..5ea92f3650 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -36,7 +36,21 @@ NON_EMPTY_TRANSLATION_UNIT # include # include -# if defined(OPENSSL_SYS_UNIX) && !defined(OPENSSL_NO_SOCK) \ +#ifndef HAVE_FORK +# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) +# define HAVE_FORK 0 +# else +# define HAVE_FORK 1 +# endif +#endif + +#if HAVE_FORK +# undef NO_FORK +#else +# define NO_FORK +#endif + +# if !defined(NO_FORK) && !defined(OPENSSL_NO_SOCK) \ && !defined(OPENSSL_NO_POSIX_IO) # define OCSP_DAEMON # include