blob: 70b304e51856bb47e93c447641d6fc99526ac546 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
diff --git a/src/fallback_malloc.cpp b/src/fallback_malloc.cpp
--- a/src/fallback_malloc.cpp
+++ b/src/fallback_malloc.cpp
@@ -15,6 +15,10 @@
#endif
#endif
+#ifdef __EMSCRIPTEN__
+#include <__memory/aligned_alloc.h>
+#endif
+
#include <assert.h>
#include <stdlib.h> // for malloc, calloc, free
#include <string.h> // for memset
diff --git a/src/stdlib_new_delete.cpp b/src/stdlib_new_delete.cpp
--- a/src/stdlib_new_delete.cpp
+++ b/src/stdlib_new_delete.cpp
@@ -12,6 +12,10 @@
#include <new>
#include <cstdlib>
+#ifdef __EMSCRIPTEN__
+#include <__memory/aligned_alloc.h>
+#endif
+
#if !defined(_THROW_BAD_ALLOC) || !defined(_LIBCXXABI_WEAK)
#error The _THROW_BAD_ALLOC and _LIBCXXABI_WEAK libc++ macros must \
already be defined by libc++.
|