From 7fa1d61695d92661c4800a7ee727ab7ae15a170b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 25 Nov 2020 14:06:35 +0400 Subject: libvhost-user: remove qemu/compiler.h usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Message-Id: <20201125100640.366523-4-marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- contrib/libvhost-user/libvhost-user.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c index 54aabd1..fab7ca1 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -27,7 +27,6 @@ #include #include #include -#include "qemu/compiler.h" #if defined(__linux__) #include @@ -60,6 +59,10 @@ /* Round number up to multiple */ #define ALIGN_UP(n, m) ALIGN_DOWN((n) + (m) - 1, (m)) +#ifndef unlikely +#define unlikely(x) __builtin_expect(!!(x), 0) +#endif + /* Align each region to cache line size in inflight buffer */ #define INFLIGHT_ALIGNMENT 64 -- cgit v1.1