Bug 203109

Summary: [Linux] Avoid usage of <sys/sysctl.h> in MallocBench
Product: WebKit Reporter: Adrian Perez <aperez>
Component: Tools / TestsAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, cgarcia, clopez, commit-queue, ews-watchlist, jbedard, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Linux   
Attachments:
Description Flags
Patch none

Adrian Perez
Reported 2019-10-17 10:19:04 PDT
On Linux systems which use glibc ≥2.30 the following will be logged during compilation: In file included from ../PerformanceTests/MallocBench/MallocBench/CPUCount.cpp:29: /usr/include/sys/sysctl.h:21:2: warning: "The <sys/sysctl.h> header is deprecated and will be removed." [-W#warnings] #warning "The <sys/sysctl.h> header is deprecated and will be removed." ^ The release notes for glibc 2.30 read: “The Linux-specific <sys/sysctl.h> header and the sysctl function have been deprecated and will be removed from a future version of glibc. Application should directly access /proc instead. For obtaining random bits, the getentropy function can be used.” (See also https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html for the full release notes.)
Attachments
Patch (1.32 KB, patch)
2019-10-17 10:23 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2019-10-17 10:20:33 PDT
Turns out, usage of sysctl() is guarded with an “#ifdef __APPLE__” guard and in Linux the sysconf() function is used instead. Adding the same guard for the header inclusion should suffice.
Adrian Perez
Comment 2 2019-10-17 10:23:34 PDT
WebKit Commit Bot
Comment 3 2019-10-17 14:44:46 PDT
Comment on attachment 381198 [details] Patch Clearing flags on attachment: 381198 Committed r251260: <https://trac.webkit.org/changeset/251260>
WebKit Commit Bot
Comment 4 2019-10-17 14:44:48 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 5 2019-10-17 14:45:18 PDT
Note You need to log in before you can comment on or make changes to this bug.