Skip to content

Commit 7fa1d61

Browse files
elmarcomstsirkin
authored andcommitted
libvhost-user: remove qemu/compiler.h usage
Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 810033b commit 7fa1d61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contrib/libvhost-user/libvhost-user.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include <sys/eventfd.h>
2828
#include <sys/mman.h>
2929
#include <endian.h>
30-
#include "qemu/compiler.h"
3130

3231
#if defined(__linux__)
3332
#include <sys/syscall.h>
@@ -60,6 +59,10 @@
6059
/* Round number up to multiple */
6160
#define ALIGN_UP(n, m) ALIGN_DOWN((n) + (m) - 1, (m))
6261

62+
#ifndef unlikely
63+
#define unlikely(x) __builtin_expect(!!(x), 0)
64+
#endif
65+
6366
/* Align each region to cache line size in inflight buffer */
6467
#define INFLIGHT_ALIGNMENT 64
6568

0 commit comments

Comments
 (0)