HomePhabricator

[test-suite] Fix CLAMR build with glibc 2.32+

Authored by Kito Cheng <kito.cheng@sifive.com> on Thu, Apr 8, 1:15 AM.

Description

[test-suite] Fix CLAMR build with glibc 2.32+

sys/sysctl.h has been removed at glibc 2.32, so this header should
not used anymore, however sysctl still invoked at memstats_memtotal,
but only for invoked when APPLE_CC is defined.

So moving #include <sys/sysctl.h> into #ifdef __APPLE_CC__.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D99930

Event Timeline

Kito Cheng <kito.cheng@sifive.com> committed rTbc37c13fb598: [test-suite] Fix CLAMR build with glibc 2.32+ (authored by Kito Cheng <kito.cheng@sifive.com>).Thu, Apr 8, 1:15 AM