]> xenbits.xensource.com Git - libvirt.git/commit
network: avoid including sys/sysctl.h on Linux
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 26 Jun 2019 13:34:20 +0000 (14:34 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Wed, 26 Jun 2019 13:36:11 +0000 (14:36 +0100)
commit3338c40b471024d9730bb8eaffd03030653f2461
treecc6cbd8018c0b390363b6d6c4a7be454dd4b83f2
parent05807e5d42f23832ab7dab17fb7e51b48b0a7c7b
network: avoid including sys/sysctl.h on Linux

The sys/sysctl.h header is only needed on BSD platforms to get
the sysctlbyname() function declaration. On Linux we talk to
procfs instead to change sysctls.

Unfortunately a legacy sys/sysctl.h header does exist on Linux
and including it has recently started triggering a deprecation
warning from glibc.

Protect its inclusion with a HAVE_SYSCTLBYNAME check instead
so that it only gets used on platforms where we need that
function declaration.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/network/bridge_driver.c