From: Marc-André Lureau <marcandre.lur...@redhat.com> Fixes linking: x86_64-w64-mingw32-gcc -o tests/test-qapi-util.exe version.rc_version.o tests/test-qapi-util.exe.p/test-qapi-util.c.obj -Wl,--allow-shlib-undefined -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase -Wl,--warn-common -m64 -fstack-protector-strong -Wl,--start-group libqemuutil.a -pthread -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lgnutls -lwinmm -lm -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lgthread-2.0 -lglib-2.0 -lintl -lws2_32 -mconsole -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group /usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: libqemuutil.a(util_oslib-win32.c.obj): in function `qemu_try_set_nonblock': /home/elmarco/src/qemu/buildw/../util/oslib-win32.c:224: undefined reference to `qemu_fd_register'
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- util/main-loop-stub.c | 26 ++++++++++++++++++++++++++ util/meson.build | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 util/main-loop-stub.c diff --git a/util/main-loop-stub.c b/util/main-loop-stub.c new file mode 100644 index 0000000000..b3e175ade5 --- /dev/null +++ b/util/main-loop-stub.c @@ -0,0 +1,26 @@ +/* + * QEMU main loop stub impl + * + * Copyright (c) 2020 Red Hat, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see <http://www.gnu.org/licenses/>. + * + */ + +#include "qemu/osdep.h" +#include "qemu/main-loop.h" + +void qemu_fd_register(int fd) +{ +} diff --git a/util/meson.build b/util/meson.build index f359af0d46..462b79a61a 100644 --- a/util/meson.build +++ b/util/meson.build @@ -79,4 +79,6 @@ if have_block util_ss.add(when: 'CONFIG_INOTIFY1', if_true: files('filemonitor-inotify.c'), if_false: files('filemonitor-stub.c')) util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c')) +else + util_ss.add(files('main-loop-stub.c')) endif -- 2.29.0