summaryrefslogtreecommitdiffstats
path: root/crypto/uid.c
diff options
context:
space:
mode:
authorRebecca Cran <rebecca@bluestop.org>2019-06-18 13:02:32 +1000
committerPauli <paul.dale@oracle.com>2019-06-18 13:07:26 +1000
commite24bdcde5a80a7edeb1e0dbbcf45c3353a974974 (patch)
tree74f23e79beb52c6d48c248d2c05d9762eef6443c /crypto/uid.c
parent2be8c56a39b0ec2ec5af6ceaf729df154d784a43 (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 #9158)
Diffstat (limited to 'crypto/uid.c')
-rw-r--r--crypto/uid.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/uid.c b/crypto/uid.c
index 494dbdeff8..3ae93f6b47 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