From c6caad1d8c811b6342c0288d26000aeaff9520db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joni=20R=C3=A4s=C3=A4nen?= Date: Fri, 28 Apr 2023 14:25:43 +0300 Subject: [PATCH] Fix compilation if sys/sysctl.h is not present Glibc 2.32 removes sys/sysctl.h as it is no longer needed. This commit uses __has_include to check whether the header exists and only includes it if it does. --- libavutil/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/cpu.c b/libavutil/cpu.c index a22da0fa..a00773fb 100644 --- a/libavutil/cpu.c +++ b/libavutil/cpu.c @@ -39,8 +39,11 @@ #include #endif #include + +#if __has_include() #include #endif +#endif #if HAVE_UNISTD_H #include #endif