From: Marc-André Lureau Date: Wed, 25 Nov 2020 10:06:35 +0000 (+0400) Subject: libvhost-user: remove qemu/compiler.h usage X-Git-Tag: qemu-xen-4.16.0-rc4~445^2~19 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7fa1d61695d92661c4800a7ee727ab7ae15a170b;p=qemu-xen.git libvhost-user: remove qemu/compiler.h usage 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 --- diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c index 54aabd1878..fab7ca17ee 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