helper: skip including sys/sysctl.h on Linux 17/5317/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Tue, 8 Oct 2019 09:17:09 +0000 (11:17 +0200)
committerPaul Fertser <fercerpav@gmail.com>
Sat, 23 Nov 2019 22:47:33 +0000 (22:47 +0000)
commitbe365730732231e0733353834b56f405a8219f2a
treea1edac641b9442604e5ce441d7923000b3b71505
parent6d54d905413243cc65687e30669a94037a14cbe6
helper: skip including sys/sysctl.h on Linux

Starting from glibc 2.30, the header file sys/sysctl.h gets
deprecated on Linux, after the commit 744e82963716 ("Linux:
Deprecate <sys/sysctl.h> and sysctl")
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=744e82963716

The associated NEWS reports
The Linux-specific <sys/sysctl.h> header and the sysctl
function have been deprecated and will be removed from a
future version of glibc.

Latest automake 1.16.1 still does not handle this case.
Current OpenOCD build fails with warning and requires configure
with "--disable-werror" to build.

Prevent including sys/sysctl.h on Linux build.

Change-Id: I5310976573352a96e5aef123352f73475f0c35fe
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5317
Tested-by: jenkins
Reviewed-by: Moritz Fischer <moritz.fischer.private@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
src/helper/options.c