diff options
author | Rebecca Cran <rebecca@bluestop.org> | 2019-06-13 16:09:47 -0600 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2019-06-18 12:53:27 +1000 |
commit | 10bf5068190ab25324648dd4a0becd4bd46ecc37 (patch) | |
tree | 8c735369b6178047a85cd35a2bd42ea9ec066d31 /crypto | |
parent | ea5d4b89cc6f0273d5085f5902b68fc4aa32cb80 (diff) |
Swap #if blocks in uid.c so target platform gets checked before host
This avoids the case where a UEFI build on FreeBSD tries to call the system
issetugid function instead of returning 0 as it should do.
CLA: trivial
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9158)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/uid.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/uid.c b/crypto/uid.c index b2b096446f..65b1171039 100644 --- a/crypto/uid.c +++ b/crypto/uid.c @@ -10,20 +10,20 @@ #include <openssl/crypto.h> #include <openssl/opensslconf.h> -#if defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ > 2) || defined(__DragonFly__) - -# include OPENSSL_UNISTD +#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI) int OPENSSL_issetugid(void) { - return issetugid(); + return 0; } -#elif defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_UEFI) +#elif defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ > 2) || defined(__DragonFly__) + +# include OPENSSL_UNISTD int OPENSSL_issetugid(void) { - return 0; + return issetugid(); } #else |