git: 0a09cfb3f766 - main - avx_sig: Avoid libbsd dependency for modern Glibc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 29 May 2023 08:09:28 UTC
The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=0a09cfb3f7664a2f573b57ffe876539da0e8c637 commit 0a09cfb3f7664a2f573b57ffe876539da0e8c637 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-05-29 08:08:35 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-05-29 08:08:35 +0000 avx_sig: Avoid libbsd dependency for modern Glibc Due to arc4random functions are povided by Glibc 2.36. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40310 --- tools/test/avx_sig/avx_sig.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/test/avx_sig/avx_sig.c b/tools/test/avx_sig/avx_sig.c index 711d40f2c231..2cfc535c3e2f 100644 --- a/tools/test/avx_sig/avx_sig.c +++ b/tools/test/avx_sig/avx_sig.c @@ -20,8 +20,13 @@ #include <pthread_np.h> #endif #ifdef __linux__ +#ifdef __GLIBC__ +#include <gnu/libc-version.h> +#endif +#if !defined(__GLIBC__) || (__GLIBC__ * 100 + __GLIBC_MINOR__) < 236 #include <bsd/stdlib.h> #endif +#endif #include <signal.h> #include <stdatomic.h> #include <stdbool.h>