qemu/subprojects/libvhost-user
Marcel Holtmann dadc3d01bc libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU
Then the libvhost-user sources are used by another project, it can not
be guaranteed that _GNU_SOURCE is set by the build system. If it is for
example not set, errors like this show up.

  CC       libvhost-user.o
libvhost-user.c: In function ‘vu_panic’:
libvhost-user.c:195:9: error: implicit declaration of function ‘vasprintf’; did you mean ‘vsprintf’? [-Werror=implicit-function-declaration]
  195 |     if (vasprintf(&buf, msg, ap) < 0) {
      |         ^~~~~~~~~
      |         vsprintf

The simplest way to allow external complication of libvhost-user.[ch] is
by setting _GNU_SOURCE if it is not already set by the build system.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Message-Id: <be27dcc747a6b5cc6f8ae3f79e0b79171382bcef.1671741278.git.marcel@holtmann.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-01-11 10:44:34 +01:00
..
include Use QEMU_SANITIZE_THREAD 2022-05-03 15:16:21 +04:00
standard-headers meson: fix meson 0.58 warning with libvhost-user subproject 2021-07-29 10:15:52 +02:00
libvhost-user-glib.c
libvhost-user-glib.h
libvhost-user.c libvhost-user: Provide _GNU_SOURCE when compiling outside of QEMU 2023-01-11 10:44:34 +01:00
libvhost-user.h libvhost-user: Switch to unsigned int for inuse field in struct VuVirtq 2022-12-21 07:32:24 -05:00
link-test.c libvhost-user: add a simple link test without glib 2020-12-09 13:04:17 -05:00
meson.build meson: fix meson 0.58 warning with libvhost-user subproject 2021-07-29 10:15:52 +02:00