Commit 10bf5068 authored by Rebecca Cran's avatar Rebecca Cran Committed by Pauli
Browse files

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: default avatarRichard Levitte <levitte@openssl.org>
Reviewed-by: default avatarPaul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9158)
parent ea5d4b89
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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