提交 b9473d8b 编写于 作者: D Daniel P. Berrange

internal: don't use weak symbols for Win32 platform

The Win32 platform will fail to link if you use weak symbols
because it is incompatible with exporting symbols in a DLL:

Cannot export virRandomGenerateWWN: symbol wrong type (2 vs 3)

We only need weak symbols for our test suite to do LD_PRELOAD
and this doesn't work on Win32, so we can just drop the hack
for Win32
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 c8fb3c31
...@@ -128,10 +128,14 @@ ...@@ -128,10 +128,14 @@
* *
*/ */
# ifndef ATTRIBUTE_MOCKABLE # ifndef ATTRIBUTE_MOCKABLE
# if __GNUC_PREREQ(4, 5) # if defined(WIN32)
# define ATTRIBUTE_MOCKABLE __attribute__((__noinline__, __noclone__, __weak__)) # define ATTRIBUTE_MOCKABLE
# else # else
# define ATTRIBUTE_MOCKABLE __attribute__((__noinline__, __weak__)) # if __GNUC_PREREQ(4, 5)
# define ATTRIBUTE_MOCKABLE __attribute__((__noinline__, __noclone__, __weak__))
# else
# define ATTRIBUTE_MOCKABLE __attribute__((__noinline__, __weak__))
# endif
# endif # endif
# endif # endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册