qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 08/11] stubs/notify-event: Mark qemu_notify_event() stub as "weak


From: Thomas Huth
Subject: [PATCH 08/11] stubs/notify-event: Mark qemu_notify_event() stub as "weak"
Date: Tue, 4 Aug 2020 19:00:52 +0200

Otherwise there is a linker error with MinGW while compiling the tests:

  LINK    tests/test-timed-average.exe
 libqemuutil.a(main-loop.o): In function `qemu_notify_event':
 /builds/huth/qemu/util/main-loop.c:139: multiple definition of
  `qemu_notify_event'
 tests/test-timed-average.o:/builds/huth/qemu/tests/../stubs/notify-event.c:5:
  first defined here
 collect2: error: ld returned 1 exit status
 /builds/huth/qemu/rules.mak:124: recipe for target
  'tests/test-timed-average.exe' failed

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 stubs/notify-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stubs/notify-event.c b/stubs/notify-event.c
index 827bb52d1a..75d98f4a79 100644
--- a/stubs/notify-event.c
+++ b/stubs/notify-event.c
@@ -1,6 +1,6 @@
 #include "qemu/osdep.h"
 #include "qemu/main-loop.h"
 
-void qemu_notify_event(void)
+void __attribute__((weak)) qemu_notify_event(void)
 {
 }
-- 
2.18.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]