aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2020-11-25 14:06:35 +0400
committerMichael S. Tsirkin <mst@redhat.com>2020-12-08 13:48:58 -0500
commit7fa1d61695d92661c4800a7ee727ab7ae15a170b (patch)
treef877c9eca8bb3e0efadfdefd1dc006d614ff9ad6 /contrib
parent810033be083040591fee2fc09f2f294670ed1930 (diff)
libvhost-user: remove qemu/compiler.h usage
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20201125100640.366523-4-marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libvhost-user/libvhost-user.c5
1 files changed, 4 insertions, 1 deletions
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 <sys/eventfd.h>
#include <sys/mman.h>
#include <endian.h>
-#include "qemu/compiler.h"
#if defined(__linux__)
#include <sys/syscall.h>
@@ -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