提交 8a8e8656 编写于 作者: E Eric Blake

build: Solve mingw build clash with DATADIR

Commit fed58d83 was a hack to fix a mingw build failure due to header
inclusion order resulting in a clash over the use of DATADIR,
repeating a trick made several other times in the past.  Better is to
revert that, and instead use pragmas to avoid the clash in the first
place, regardless of header ordering, solving it for everyone.
Signed-off-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 ca4e86ca
......@@ -21,8 +21,6 @@
#include <config.h>
#include <unistd.h>
#include "configmake.h"
#include "internal.h"
#include "virbitmap.h"
......
......@@ -218,7 +218,10 @@ VIR_STATIC unsigned int virAtomicIntXor(volatile unsigned int *atomic,
# ifdef VIR_ATOMIC_OPS_WIN32
# pragma push_macro("DATADIR") /* If "configmake.h" was included first */
# undef DATADIR
# include <winsock2.h>
# pragma pop_macro("DATADIR")
# include <windows.h>
# include <intrin.h>
# if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册