--- gprofng/common/cpuid.c 2024-08-17 07:00:00.000000000 +0800 +++ gprofng/common/cpuid.c 2024-09-22 03:26:51.000000000 +0800 @@ -18,6 +18,10 @@ Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ +#ifdef __linux__ +#include +#endif + #if defined(__i386__) || defined(__x86_64) #include /* GCC-provided */ #elif defined(__aarch64__) @@ -46,8 +50,11 @@ #include #include #include +// This header does not exist in earlier versions. +#if defined(__linux__) && LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0) #include #endif +#endif /* * Various routines to handle identification