Merge pull request #3283 from dunhamsteve/fix-windows-ci

[ fix ] fix windows CI, aligned_alloc not supported on win32
This commit is contained in:
André Videla 2024-05-18 08:21:28 +01:00 committed by GitHub
commit 2a3f0311f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,7 +2,8 @@
#include "runtime.h"
Value *idris2_newValue(size_t size) {
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */
#if !defined(_WIN32) && defined(__STDC_VERSION__) && \
(__STDC_VERSION__ >= 201112) /* C11 */
Value *retVal = (Value *)aligned_alloc(
sizeof(void *),
((size + sizeof(void *) - 1) / sizeof(void *)) * sizeof(void *));