From 0b1ecf7b5342f8631d1b1cce8a7937bda511be98 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 2 Aug 2017 17:31:14 +0200 Subject: [PATCH] util: hash: Make virHashCodeGen mockable 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 054315fb74..32ac0835e9 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 7732f816cf..f8171df268 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__ */ -- GitLab