Fix strict-warnings build on FreeBSD
authorBenjamin Kaduk <kaduk@mit.edu>
Wed, 24 Jan 2018 19:54:46 +0000 (13:54 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 29 Jan 2018 14:30:11 +0000 (08:30 -0600)
commitc6a351a54c8a9fbcdf07ae2171ab8f6dd4416a5d
tree83614e1cb4b0652cbb0ba6955a547050a6b2ba31
parentb09aa2709ddaa5bb2ffd323c3289076b5e9c6531
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@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5160)
crypto/engine/eng_cryptodev.c