diff options
author | David Benjamin <davidben@chromium.org> | 2015-01-21 23:56:14 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-01-22 22:22:39 +0300 |
commit | 384673ceb7a8160e6ef836eda0382de60b781b5c (patch) | |
tree | 63a97f533f421bd8f7b6dd4108f81217fb45a080 /tool/speed.cc | |
parent | cb878e20f30186509a4e43b423f00cbb3ba7deea (diff) |
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>
Diffstat (limited to 'tool/speed.cc')
-rw-r--r-- | tool/speed.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tool/speed.cc b/tool/speed.cc index 6bc74bef..cfffcb05 100644 --- a/tool/speed.cc +++ b/tool/speed.cc @@ -170,7 +170,13 @@ struct free_functor { }; #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; |