Index: src/shared/platform/win/nacl_secure_random.c |
diff --git a/src/shared/platform/win/nacl_secure_random.c b/src/shared/platform/win/nacl_secure_random.c |
index f549441bab6d784d74a7fa1063ed5a2012cb8fab..b73766fccf702e3f0891e4dac1477fb55e9256fc 100644 |
--- a/src/shared/platform/win/nacl_secure_random.c |
+++ b/src/shared/platform/win/nacl_secure_random.c |
@@ -9,6 +9,14 @@ |
*/ |
#include <windows.h> |
+/* Work around a clang-cl bug: SecureZeroMemory() below uses __stosb() but |
+ * windows.h only declares that intrinsic and then uses `#pragma intrinsic` for |
+ * it. clang-cl doesn't implement `#pragma intrinsic` yet; it instead defines |
+ * the function as an always-inline symbol in its intrin.h. |
+ * TODO(thakis): Remove this once http://llvm.org/PR19898 is fixed. |
+ */ |
+#include <intrin.h> |
+ |
/* |
* #define needed to link in RtlGenRandom(), a.k.a. SystemFunction036. See |
* the "Community Additions" comment on MSDN here: |