[openssl-commits] [openssl] OpenSSL_1_1_0-stable update
kaduk at mit.edu
kaduk at mit.edu
Mon Jan 29 14:39:26 UTC 2018
The branch OpenSSL_1_1_0-stable has been updated
via c6a351a54c8a9fbcdf07ae2171ab8f6dd4416a5d (commit)
from b09aa2709ddaa5bb2ffd323c3289076b5e9c6531 (commit)
- Log -----------------------------------------------------------------
commit c6a351a54c8a9fbcdf07ae2171ab8f6dd4416a5d
Author: Benjamin Kaduk <kaduk at mit.edu>
Date: Wed Jan 24 13:54:46 2018 -0600
Fix strict-warnings build on FreeBSD
The cryptodev engine is only available for OpenBSD and FreeBSD,
but for the OS version-specific checks the OpenBSD macro is not
defined on FreeBSD. When building with -Werror and -Wundef (enabled
by strict-warnings), the FreeBSD build fails:
crypto/engine/eng_cryptodev.c:47:7: error: 'OpenBSD' is not defined,
evaluates to 0
[-Werror,-Wundef]
\# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 &&
\# __FreeBSD_versi...
^
The reverse case would be true on OpenBSD (__FreeBSD_version would
not be defined), but since the boolean will short-circuit and this
code is only executed on OpenBSD and FreeBSD, and the line is
already pretty long, leave that out for now.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5160)
-----------------------------------------------------------------------
Summary of changes:
crypto/engine/eng_cryptodev.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
index d63c918..f8243f0 100644
--- a/crypto/engine/eng_cryptodev.c
+++ b/crypto/engine/eng_cryptodev.c
@@ -44,10 +44,13 @@
#if (defined(__unix__) || defined(unix)) && !defined(USG) && \
(defined(OpenBSD) || defined(__FreeBSD__))
# include <sys/param.h>
-# if (OpenBSD >= 200112) || ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || __FreeBSD_version >= 500041)
+# if (defined(OpenBSD) && (OpenBSD >= 200112)) || \
+ (defined(__FreeBSD_version) && \
+ ((__FreeBSD_version >= 470101 && __FreeBSD_version < 500000) || \
+ __FreeBSD_version >= 500041))
# define HAVE_CRYPTODEV
# endif
-# if (OpenBSD >= 200110)
+# if defined(OpenBSD) && (OpenBSD >= 200110)
# define HAVE_SYSLOG_R
# endif
#endif
More information about the openssl-commits
mailing list