summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-02-19 23:42:26 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2012-02-23 19:03:26 +0100
commitf113a2add82362c82d4631488f812765c30f166d (patch)
tree71851bdf34eb595f320020236d2c9fdcc8125103
parent9a19829697c44598a0ced93b513ec04bb8fc6e80 (diff)
mingw: don't redefine CTL_CODE if it's already defined
-rw-r--r--vdservice/pci_vdi_port.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/vdservice/pci_vdi_port.cpp b/vdservice/pci_vdi_port.cpp
index fce13bd..4deace1 100644
--- a/vdservice/pci_vdi_port.cpp
+++ b/vdservice/pci_vdi_port.cpp
@@ -24,9 +24,12 @@
#define METHOD_BUFFERED 0
#define FILE_ANY_ACCESS 0
+#ifndef CTL_CODE
+//With mingw, this is defined in winioctl.h
#define CTL_CODE(DeviceType, Function, Method, Access) ( \
((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
)
+#endif
#define FIRST_AVAIL_IO_FUNC 0x800
#define RED_TUNNEL_CTL_FUNC FIRST_AVAIL_IO_FUNC