vhost-user-bridge: fix "unknown type name" compilation error
PATCH 1/1 vhost-user-bridge: fix "unknown type name" compilation error
osdep.h should be included first:
CC tests/vhost-user-bridge.o
In file included from /home/elmarco/src/qemu/tests/vhost-user-bridge.c:32:/home/elmarco/src/qemu/include/qemu/atomic.h:480:1: error: unknown type name ‘int64_t’
int64_t atomic_read_i64(const int64_t *ptr);
^~~~~~~/home/elmarco/src/qemu/include/qemu/atomic.h:480:32: error: unknown type name ‘int64_t’
int64_t atomic_read_i64(const int64_t *ptr);
^~~~~~~/home/elmarco/src/qemu/include/qemu/atomic.h:481:1: error: unknown type name ‘uint64_t’
uint64_t atomic_read_u64(const uint64_t *ptr);
^~~~~~~~/home/elmarco/src/qemu/include/qemu/atomic.h:481:32: error: unknown type name ‘uint64_t’
uint64_t atomic_read_u64(const uint64_t *ptr);
^~~~~~~~
/home/elmarco/src/qemu/include/qemu/atomic.h:482:21: error: unknown type name ‘int64_t’
void atomic_set_i64(int64_t *ptr, int64_t val);
^~~~~~~
/home/elmarco/src/qemu/include/qemu/atomic.h:482:35: error: unknown type name ‘int64_t’
void atomic_set_i64(int64_t *ptr, int64_t val);
^~~~~~~
/home/elmarco/src/qemu/include/qemu/atomic.h:483:21: error: unknown type name ‘uint64_t’
void atomic_set_u64(uint64_t *ptr, uint64_t val);
^~~~~~~~
/home/elmarco/src/qemu/include/qemu/atomic.h:483:36: error: unknown type name ‘uint64_t’
void atomic_set_u64(uint64_t *ptr, uint64_t val);
^~~~~~~~(regression from 782da5b2921c4d18777d5d5bd9385b9f7beae360)
--- tests/vhost-user-bridge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tests/vhost-user-bridge.c +2 -1
@@ -29,8 +29,9 @@#define _FILE_OFFSET_BITS 64 -#include "qemu/atomic.h" #include "qemu/osdep.h" + +#include "qemu/atomic.h" #include "qemu/iov.h" #include "standard-headers/linux/virtio_net.h" #include "contrib/libvhost-user/libvhost-user.h"
Signature · 1 line
2.19.1.708.g4ede3d42df
Quoted 29 lines · Marc-André Lureau
osdep.hshould be included first:CC
tests/vhost-user-bridge.o
In file included from/home/elmarco/src/qemu/tests/vhost-user-bridge.c:32:/home/elmarco/src/qemu/include/qemu/atomic.h:480:1: error: unknown type name ‘int64_t’
int64_tatomic_read_i64(const int64_t *ptr);
^~~~~~~/home/elmarco/src/qemu/include/qemu/atomic.h:480:32: error: unknown type name ‘int64_t’int64_t atomic_read_i64(const int64_t *ptr); ^~~~~~~
/home/elmarco/src/qemu/include/qemu/atomic.h:481:1: error: unknown type name ‘uint64_t’
uint64_tatomic_read_u64(const uint64_t *ptr);
^~~~~~~~/home/elmarco/src/qemu/include/qemu/atomic.h:481:32: error: unknown type name ‘uint64_t’uint64_t atomic_read_u64(const uint64_t *ptr); ^~~~~~~~ /home/elmarco/src/qemu/include/qemu/atomic.h:482:21: error: unknown type name ‘int64_t’ void atomic_set_i64(int64_t *ptr, int64_t val); ^~~~~~~ /home/elmarco/src/qemu/include/qemu/atomic.h:482:35: error: unknown type name ‘int64_t’ void atomic_set_i64(int64_t *ptr, int64_t val); ^~~~~~~ /home/elmarco/src/qemu/include/qemu/atomic.h:483:21: error: unknown type name ‘uint64_t’ void atomic_set_u64(uint64_t *ptr, uint64_t val); ^~~~~~~~ /home/elmarco/src/qemu/include/qemu/atomic.h:483:36: error: unknown type name ‘uint64_t’ void atomic_set_u64(uint64_t *ptr, uint64_t val); ^~~~~~~~
Quoted 6 lines
(regression from
782da5b2921c4d18777d5d5bd9385b9f7beae360)Signed-off-by Marc-André Lureau <[email protected]>--- tests/vhost-user-bridge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Funny, I was just looking into this right now :-)
Michal
Quoted 6 lines · Marc-André Lureau
osdep.hshould be included first:CC
tests/vhost-user-bridge.o
In file included from/home/elmarco/src/qemu/tests/vhost-user-bridge.c:32:/home/elmarco/src/qemu/include/qemu/atomic.h:480:1: error: unknown type name ‘int64_t’
int64_tatomic_read_i64(const int64_t *ptr);
(snip)
Quoted 3 lines
(regression from
782da5b2921c4d18777d5d5bd9385b9f7beae360)Signed-off-by Marc-André Lureau <[email protected]>
Thanks,
Emilio