aboutsummaryrefslogtreecommitdiff
path: root/qemu-bridge-helper.c
diff options
context:
space:
mode:
authorXuzhou Cheng <xuzhou.cheng@windriver.com>2022-09-25 19:30:10 +0800
committerThomas Huth <thuth@redhat.com>2022-09-27 20:51:21 +0200
commit39f0e991e10706447cad782e0de48ad9724aadf7 (patch)
treee01cf9b25f6ca154787bf12aa5ca0351d9b7e53e /qemu-bridge-helper.c
parentb82cbbf0f229f0295e917c69b40e6c12365782e8 (diff)
tests/qtest: libqtest: Adapt global_qtest declaration for win32
Commit dd2107497275 ("tests/libqtest: Use libqtest-single.h in tests that require global_qtest") moved global_qtest to libqtest-single.h, by declaring global_qtest attribute to be common and weak. This trick unfortunately does not work on Windows, and building qtest test cases results in multiple definition errors of the weak symbol global_qtest, as Windows PE does not have the concept of the so-called weak symbol like ELF in the *nix world. However Windows does provide a trick to declare a variable to be a common symbol, via __declspec(selectany) [1]. It does not provide the "strong override weak" effect but we don't need it in our use case anyway. So let's use it for win32. [1] https://docs.microsoft.com/en-us/cpp/cpp/selectany Signed-off-by: Xuzhou Cheng <xuzhou.cheng@windriver.com> Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20220925113032.1949844-33-bmeng.cn@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'qemu-bridge-helper.c')
0 files changed, 0 insertions, 0 deletions