From nobody Fri May 3 23:54:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1561556577; cv=none; d=zoho.com; s=zohoarc; b=J36lCfPxRvCoaeGwXcy64DLB/sYmLKHWzMqtMkiSq/yeGraqinr9YMkaskhf9qERlaPByrLZOidtDaYugNR/rG24bEuExY4472a9h4oZuh+P3yHRMNLZxWMB/FM8OyMjc9vtlSaW8BZ4ClU/wEwbqVnBkMolhyC1hYp9D8BQkFA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561556577; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=+J85KQgJrsC8aJMaGLH0flY1/ygDCLdYmQg6XNQ+1I8=; b=OiefxoGXazbj5iN00qs/cOa9Rzo1KBsoBknMKrppDQ5wlZGkfxtmeKXKdjKvo0QVwXFSI0OKcTnG75xRWRV0UO67qMPA0yGGp+TrPKbu5EDwTuOKltndPD6ON2IlSekMqWEwX6kJins2G5PVmJHjrcehCyubKzEsIm/Hrf+Wfhk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1561556577432889.6188962490334; Wed, 26 Jun 2019 06:42:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D6FB387633; Wed, 26 Jun 2019 13:41:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E848F1001B04; Wed, 26 Jun 2019 13:41:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 906F5206D2; Wed, 26 Jun 2019 13:41:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x5QDfEbL007590 for ; Wed, 26 Jun 2019 09:41:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 736EC5D9DE; Wed, 26 Jun 2019 13:41:14 +0000 (UTC) Received: from catbus.gsslab.fab.redhat.com (dhcp-32.gsslab.fab.redhat.com [10.33.9.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1AE65D9D3; Wed, 26 Jun 2019 13:41:11 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 26 Jun 2019 14:38:49 +0100 Message-Id: <20190626133849.18762-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] network: avoid including sys/sysctl.h on Linux X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 26 Jun 2019 13:42:45 +0000 (UTC) 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=C3=A9 --- Pushed as build fix for Fedora rawhide src/network/bridge_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 465487432e..19faf7d514 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -33,7 +33,7 @@ #include #include #include -#if HAVE_SYS_SYSCTL_H +#ifdef HAVE_SYSCTLBYNAME # include #endif =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list