WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
203109
[Linux] Avoid usage of <sys/sysctl.h> in MallocBench
https://bugs.webkit.org/show_bug.cgi?id=203109
Summary
[Linux] Avoid usage of <sys/sysctl.h> in MallocBench
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
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
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
Created
attachment 381198
[details]
Patch
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
<
rdar://problem/56386384
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug