Skip to content

Commit

Permalink
Openssl fails to compile on Debian with kfreebsd kernels
Browse files Browse the repository at this point in the history
(kfreebsd-amd64, kfreebsd-i386). The error reported by the compiler
is:

../crypto/uid.c: In function 'OPENSSL_issetugid':
../crypto/uid.c:50:22: error: 'AT_SECURE' undeclared (first use in this function)
   50 |     return getauxval(AT_SECURE) != 0;
      |                      ^~~~~~~~~

This commit changes the code to use the freebsd code in this case.
This fixes the compilation.

CLA: trivial

Reviewed-by: Ben Kaduk <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from openssl#16477)
  • Loading branch information
ellert authored and paulidale committed Sep 2, 2021
1 parent 8e706c8 commit 3a1fa01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/uid.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ int OPENSSL_issetugid(void)
return 0;
}

#elif defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ > 2) || defined(__DragonFly__)
#elif defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ > 2) || defined(__DragonFly__) || (defined(__GLIBC__) && defined(__FreeBSD_kernel__))

# include <unistd.h>

Expand Down

0 comments on commit 3a1fa01

Please sign in to comment.