Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Unified Diff: src/shared/platform/win/nacl_secure_random.c

Issue 2070533002: win: Add an explicit intrin.h include to work around a clang-cl bug. (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698