aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-11-12 18:16:27 +0100
committerRichard Levitte <levitte@openssl.org>2019-02-11 16:44:59 +0100
commitca811248d838058c13236a6c3b688e0ac98c02c8 (patch)
tree08a626705656a9fec6e1c3efab18ec9af85ff7a5
parent6e68f244f48bd7118b9262ff5905da1c3b15cae9 (diff)
downloadopenssl-ca811248d838058c13236a6c3b688e0ac98c02c8.zip
openssl-ca811248d838058c13236a6c3b688e0ac98c02c8.tar.gz
openssl-ca811248d838058c13236a6c3b688e0ac98c02c8.tar.bz2
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 <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7624)
-rw-r--r--apps/ocsp.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/apps/ocsp.c b/apps/ocsp.c
index 7c2a904..09eeb9c 100644
--- a/apps/ocsp.c
+++ b/apps/ocsp.c
@@ -36,7 +36,21 @@ NON_EMPTY_TRANSLATION_UNIT
# include <openssl/x509v3.h>
# include <openssl/rand.h>
-# 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 <sys/types.h>