From nobody Fri May 16 05:22:55 2025 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15016883493965.595824741243973; Wed, 2 Aug 2017 08:39:09 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A234573A4A; Wed, 2 Aug 2017 15:39:06 +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 3B7B17F76D; Wed, 2 Aug 2017 15:39:06 +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 8B92D180B467; Wed, 2 Aug 2017 15:39:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v72Fd3sF032252 for ; Wed, 2 Aug 2017 11:39:03 -0400 Received: by smtp.corp.redhat.com (Postfix) id 45E077F771; Wed, 2 Aug 2017 15:39:03 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98FF37F76D; Wed, 2 Aug 2017 15:39:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A234573A4A Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 2 Aug 2017 17:39:02 +0200 Message-Id: <1b1ce55433aa6d7735b8706fcd70b0179327565d.1501688308.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 2/3] util: hash: Make virHashCodeGen mockable 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 02 Aug 2017 15:39:07 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Export the function from the util module so that dynamic linking can override it. --- src/libvirt_private.syms | 4 ++++ src/util/virhashcode.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 054315fb7..32ac0835e 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1774,6 +1774,10 @@ virHashUpdateEntry; virHashValueFree; +# util/virhashcode.h +virHashCodeGen; + + # util/virhook.h virHookCall; virHookInitialize; diff --git a/src/util/virhashcode.h b/src/util/virhashcode.h index 7732f816c..f8171df26 100644 --- a/src/util/virhashcode.h +++ b/src/util/virhashcode.h @@ -30,6 +30,7 @@ # include "internal.h" -uint32_t virHashCodeGen(const void *key, size_t len, uint32_t seed); +uint32_t virHashCodeGen(const void *key, size_t len, uint32_t seed) + ATTRIBUTE_NOINLINE; #endif /* __VIR_HASH_CODE_H__ */ --=20 2.13.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list