Fix tool build on Windows.
C++ doesn't allow implicit void* casts.
Change-Id: I50a2ab3fce6a38470b4e8216bd461ba2cd2c2215
Reviewed-on: https://boringssl-review.googlesource.com/2971
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/tool/speed.cc b/tool/speed.cc
index 6bc74be..cfffcb0 100644
--- a/tool/speed.cc
+++ b/tool/speed.cc
@@ -170,7 +170,13 @@
};
#if defined(OPENSSL_WINDOWS)
-#define AllocAligned malloc
+uint8_t *AllocAligned(size_t size) {
+ void *ptr = malloc(size);
+ if (ptr == NULL) {
+ abort();
+ }
+ return static_cast<uint8_t*>(ptr);
+}
#else
uint8_t *AllocAligned(size_t size) {
void *ptr;