Index: device/bluetooth/bluetooth_low_energy_defs_win.h |
diff --git a/device/bluetooth/bluetooth_low_energy_defs_win.h b/device/bluetooth/bluetooth_low_energy_defs_win.h |
index 77220c74cdaa92bfa012db75725ab1b1cc3c8f8d..bb4e468f8593bdee174b69e4a57832d1d4cd5d3a 100644 |
--- a/device/bluetooth/bluetooth_low_energy_defs_win.h |
+++ b/device/bluetooth/bluetooth_low_energy_defs_win.h |
@@ -8,10 +8,16 @@ |
#include <windows.h> |
#include <cfg.h> |
#include <devpkey.h> |
+#include <ntverp.h> // For VER_PRODUCTBUILD |
#include <setupapi.h> |
+#if VER_PRODUCTBUILD > 9600 |
+// bthledef.h is fixed in the Windows 10 SDK and the extra pop then triggers a |
+// warning, so we skip it when VER_PRODUCTBUILD is > 9600 (8.1 SDK) |
+#include <bthledef.h> |
+#else |
#pragma warning(push) |
-// bthledef.h is buggy and contains |
+// bthledef.h in the Windows 8.1 SDK is buggy and contains |
// #pragma pop |
// which should be |
// #pragma warning(pop) |
@@ -21,6 +27,7 @@ |
#include <bthledef.h> |
#pragma warning(pop) |
#pragma warning(pop) |
+#endif |
#include <bluetoothapis.h> |
#include <bluetoothleapis.h> |