]> sigrok.org Git - libserialport.git/commitdiff
windows: Fix compile issues with multiply or not defined GUIDs.
authorMartin Ling <redacted>
Wed, 24 Sep 2014 19:53:03 +0000 (20:53 +0100)
committerUwe Hermann <redacted>
Thu, 25 Sep 2014 21:04:06 +0000 (23:04 +0200)
This fixes bug #416.

libserialport_internal.h

index 031ffeffde76150fcb3b5e6d4af4426dad19a114..8ef8376f9a5d29b1b176adcb4b9bb879b8049b86 100644 (file)
 #include <stdio.h>
 #include <stdarg.h>
 #ifdef _WIN32
-#include <initguid.h>
-
 #include <windows.h>
 #include <tchar.h>
 #include <setupapi.h>
 #include <cfgmgr32.h>
+#undef DEFINE_GUID
+#define DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
+       static const GUID name = { l,w1,w2,{ b1,b2,b3,b4,b5,b6,b7,b8 } }
 #include <usbioctl.h>
 #include <usbiodef.h>
 #else