build: Allow using system xxhash

This commit is contained in:
Alexandre Bouvier 2022-04-17 12:38:55 +02:00 committed by mborgerson
parent 83e16c996d
commit 63f48393e7
2 changed files with 2 additions and 1 deletions

View File

@ -2268,6 +2268,7 @@ util_ss.add_all(trace_ss)
util_ss = util_ss.apply(config_all, strict: false) util_ss = util_ss.apply(config_all, strict: false)
libqemuutil = static_library('qemuutil', libqemuutil = static_library('qemuutil',
sources: util_ss.sources() + stub_ss.sources() + genh, sources: util_ss.sources() + stub_ss.sources() + genh,
include_directories: 'util/xxHash',
dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman]) dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman])
qemuutil = declare_dependency(link_with: libqemuutil, qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res) sources: genh + version_res)

View File

@ -1,5 +1,5 @@
#include "qemu/fast-hash.h" #include "qemu/fast-hash.h"
#include "util/xxHash/xxh3.h" #include <xxh3.h>
uint64_t fast_hash(const uint8_t *data, size_t len) uint64_t fast_hash(const uint8_t *data, size_t len)
{ {