Page MenuHomePhabricator

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

Authored by kito-cheng on Apr 6 2021, 1:47 AM.

Details

Summary

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__.

Event Timeline

kito-cheng requested review of this revision.Apr 6 2021, 1:47 AM
kito-cheng created this revision.

News of Glibc 2.32:
https://sourceware.org/pipermail/libc-announce/2020/000029.html

* The deprecated <sys/sysctl.h> header and the sysctl function have been
  removed.  To support old binaries, the sysctl function continues to
  exist as a compatibility symbol (on those architectures which had it),
  but always fails with ENOSYS.  This reflects the removal of the system
  call from all architectures, starting with Linux 5.5.

I don't know who is the right people to add as reviewer here, and I saw @MaskRay and @lenary you guys has reviewed this repo before, and most important is I know you guys :P so could you help me to review that or find the right people to review that? Thanks :)

MaskRay accepted this revision.Apr 8 2021, 12:25 AM

Looks great!

This revision is now accepted and ready to land.Apr 8 2021, 12:25 AM