mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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: Eric Blake <eblake@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
ca4e86cac2
commit
8a8e86564a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user