From nobody Sun Apr 28 20:06:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1599129828; cv=none; d=zohomail.com; s=zohoarc; b=aFZcu7MAlaMRAcBy+D3CK5M2Xq2yg6Vi1AI0eWlp3o5oghgS/f7gAXU8FlQSSaYm9UoAdRUCqHywsk36p5K2RPwUxp2QXBNjbkAw+l7l7cb+gCzlM5nUnNu8rymNRSN8an8UisGqwuRZzNZDktFYK/V56cZ/49YwWfBYmOjSqh0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1599129828; 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; bh=5wjBjikpGgN/ffibMZ1hogEk+EOb08nkDgk1juHdp1g=; b=mqWA8A39Uc/vZcubvF9EHWxwtAe/Oov5Odl7pFXSOx3/ml3wd3CTR2ygw3pBm5+ostX66zmrfyvraaFZoNp6Zkvj5UwSmrrVqdfZAuAjFbaswRMz5J7/Kpxuw2qx6swTScJxhUjqZUQLa/sw3ZLJrlxmbQe/MQfU8VBkSdRnoEM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1599129828104837.4386629875182; Thu, 3 Sep 2020 03:43:48 -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-275-j1RGfg1OMvmAsSttbxfZmA-1; Thu, 03 Sep 2020 06:43:45 -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 A47C985C708; Thu, 3 Sep 2020 10:43:39 +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 2CDA119656; Thu, 3 Sep 2020 10:43:39 +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 CFCE0181A06B; Thu, 3 Sep 2020 10:43:38 +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 083AhaFs004717 for ; Thu, 3 Sep 2020 06:43:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id D1D9278B38; Thu, 3 Sep 2020 10:43:36 +0000 (UTC) Received: from harajuku.usersys.redhat.com (unknown [10.40.192.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 07EC38118A for ; Thu, 3 Sep 2020 10:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599129827; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5wjBjikpGgN/ffibMZ1hogEk+EOb08nkDgk1juHdp1g=; b=hAjEqA70u3TrBRf6O5QhtpIJormsV9HH7A4CgkBo4bAmN3J7LJ456tag66GeVBzXPR8caD HPwEB0vQKabL0OBt7/kTkIR+JN03RKg7KJAYSTNo52OOc7xwP/kCgqMu+kId6JRktLG9o5 B5FCDBlWCgmP6QQ3rneQg3L52c4D4+s= X-MC-Unique: j1RGfg1OMvmAsSttbxfZmA-1 From: Andrea Bolognani To: libvir-list@redhat.com Subject: [libvirt PATCH] wireshark: Don't include config.h Date: Thu, 3 Sep 2020 12:43:29 +0200 Message-Id: <20200903104329.35960-1-abologna@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.001 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" While both Debian and Fedora include the header in their development packages for Wireshark, that's not something that the upstream developers intended and arguably quite wrong, as config.h is obviously intended to only be used to drive the compilation of Wireshark itself. The Arch Linux package behaves like the upstream Wireshark package, and thus libvirt fails to build there. It seems that there are multiple bugs to be addressed: * libvirt shouldn't include config.h; * Debian and Fedora shouldn't be shipping config.h in their Wireshark packages; * Wireshark should not use config.h defines such as HAVE_PLUGINS in its public headers, and define a public variant of them instead. This patch takes care of the first one. https://gitlab.com/libvirt/libvirt/-/issues/74 Signed-off-by: Andrea Bolognani Reviewed-by: Laine Stump --- tools/wireshark/src/packet-libvirt.c | 1 - tools/wireshark/src/plugin.c | 13 +++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/wireshark/src/packet-libvirt.c b/tools/wireshark/src/pac= ket-libvirt.c index 9f3c7f650d..965f1f5482 100644 --- a/tools/wireshark/src/packet-libvirt.c +++ b/tools/wireshark/src/packet-libvirt.c @@ -18,7 +18,6 @@ */ #include =20 -#include #include #include #include diff --git a/tools/wireshark/src/plugin.c b/tools/wireshark/src/plugin.c index 504e4383a7..3c6fae9ef5 100644 --- a/tools/wireshark/src/plugin.c +++ b/tools/wireshark/src/plugin.c @@ -14,11 +14,12 @@ =20 #include =20 -#include +#define HAVE_PLUGINS 1 #include /* plugins are DLLs */ #define WS_BUILD_DLL #include +#include =20 #include "packet-libvirt.h" =20 @@ -26,9 +27,9 @@ #define PLUGIN_VERSION VERSION =20 #define WIRESHARK_VERSION \ - ((VERSION_MAJOR * 1000 * 1000) + \ - (VERSION_MINOR * 1000) + \ - (VERSION_MICRO)) + ((WIRESHARK_VERSION_MAJOR * 1000 * 1000) + \ + (WIRESHARK_VERSION_MINOR * 1000) + \ + (WIRESHARK_VERSION_MICRO)) =20 #if WIRESHARK_VERSION < 2005000 =20 @@ -69,8 +70,8 @@ void proto_register_libvirt(void); void proto_reg_handoff_libvirt(void); =20 WS_DLL_PUBLIC_DEF const gchar plugin_version[] =3D PLUGIN_VERSION; -WS_DLL_PUBLIC_DEF const int plugin_want_major =3D VERSION_MAJOR; -WS_DLL_PUBLIC_DEF const int plugin_want_minor =3D VERSION_MINOR; +WS_DLL_PUBLIC_DEF const int plugin_want_major =3D WIRESHARK_VERSION_MAJOR; +WS_DLL_PUBLIC_DEF const int plugin_want_minor =3D WIRESHARK_VERSION_MINOR; =20 WS_DLL_PUBLIC void plugin_register(void); =20 --=20 2.26.2