From nobody Mon Nov 25 15:42:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1601507830; cv=none; d=zohomail.com; s=zohoarc; b=gEcSmcUm2jAiqHxWmhdnydlenkMCoqMs5x/oaeUv47fy6/Hh9GvXexcL78kD6iNl748d5bcXpcUdSKCNXgk9dQysNyxyyjAW1cVG3Py+EidHs3dpjPEYF5LMhUxeGq5+kTxt3U4RlPSIN5wa7v6kVWByZZpBGvADOEEVR0pZNBA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601507830; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=K3oY2rj3cFYmEibd0u1Yox0K4lyXNcV29HMziCUH0dk=; b=mswMb41xvRZYwEjs95FpCKO36QJbatCpg4tOdD/SkfyAEsJmNYiYnZZ3jycrQe6vMQxPsyyiWME3f7Rz0Hh7nApe8hFEK3at7HlYlHeU7JJNdxWHd40qOPAUsQuCBkUCFLidZ9WQJxlLYk8QRb2tFzic20EgFuWPsIUjJ5Le4OM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1601507830605669.9475786259286; Wed, 30 Sep 2020 16:17:10 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-117-ullzjNpeNSOHZMbsTe8ZQw-1; Wed, 30 Sep 2020 19:17:07 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2EED8802B7C; Wed, 30 Sep 2020 23:17:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 092B319C59; Wed, 30 Sep 2020 23:17:01 +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 CA9AC183D027; Wed, 30 Sep 2020 23:17:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08UNEriU028019 for ; Wed, 30 Sep 2020 19:14:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2F1AA55762; Wed, 30 Sep 2020 23:14:53 +0000 (UTC) Received: from vhost2.laine.org (ovpn-112-224.phx2.redhat.com [10.3.112.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id DCAAB3782 for ; Wed, 30 Sep 2020 23:14:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601507829; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=K3oY2rj3cFYmEibd0u1Yox0K4lyXNcV29HMziCUH0dk=; b=Uttod+Ru4bK2ZwOrmVq/wJL+dBbz2xaPlErAkjie88t224SYYJT+QQrJfZ/jw5D+AKZJ83 UUh1Uh2ivh37Mrz072WLGGQuGRdWsybm4fPpY+9vJeh0f4YX8AYjouAC+7HSqlE7W5s2zG o/TyIz5xvYGkD0uL3Bjt1Emf1yfmbsw= X-MC-Unique: ullzjNpeNSOHZMbsTe8ZQw-1 From: Laine Stump To: libvir-list@redhat.com Subject: [PATCH 5/9] build: simplify check for WITH_MACVTAP Date: Wed, 30 Sep 2020 19:14:40 -0400 Message-Id: <20200930231444.409215-6-laine@redhat.com> In-Reply-To: <20200930231444.409215-1-laine@redhat.com> References: <20200930231444.409215-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" macvtap support was added to the Linux kernel in 2.6.33. libvirt checked for this by looking for MACVLAN_MODE_BRIDGE and IFLA_VF_MAX in linux/if_link.h. This hasn't been necessary for a very long time, so just gate on platform =3D=3D 'linux' (and be sure to complain if someone tries to enable it on a non-Linux platform). Signed-off-by: Laine Stump --- meson.build | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index 5e0af76bbc..fe08a45b46 100644 --- a/meson.build +++ b/meson.build @@ -1159,20 +1159,15 @@ libxml_dep =3D dependency('libxml-2.0', version: '>= =3D' + libxml_version) cc =3D meson.get_compiler('c') m_dep =3D cc.find_library('m', required : false) =20 -use_macvtap =3D false -if not get_option('macvtap').disabled() - if (cc.has_header_symbol('linux/if_link.h', 'MACVLAN_MODE_BRIDGE') and - cc.has_header_symbol('linux/if_link.h', 'IFLA_VF_MAX')) - use_macvtap =3D true +if host_machine.system() =3D=3D 'linux' + if not get_option('macvtap').disabled() + conf.set('WITH_MACVTAP', 1) endif - - if get_option('macvtap').enabled() and not use_macvtap - error('Installed linux headers don\'t show support for macvtap device.= ') +else + if get_option('macvtap').enabled() + error('macvtap is not supported on this platform.') endif endif -if use_macvtap - conf.set('WITH_MACVTAP', 1) -endif =20 netcf_version =3D '0.1.8' netcf_dep =3D dependency('netcf', version: '>=3D' + netcf_version, require= d: get_option('netcf')) --=20 2.26.2