Fix GCC on Mac builds
aligned_alloc() seems not fully supported when using GCC on Mac,
so use posix_memalign() instead.
aligned_alloc() returns null in tests and
states:
".. not supported by the implementation causes the function to
fail and return a null pointer"
@@ -61,6 +61,8 @@ extern "C" {
#define PORTABLE_C11_ALIGNED_ALLOC 0
#elif defined (__clang__)
#define PORTABLE_C11_ALIGNED_ALLOC 0
+#elif defined (__APPLE__)
+#define PORTABLE_C11_ALIGNED_ALLOC 0
#elif defined(__IBMC__)
#define PORTABLE_C11_ALIGNED_ALLOC 0
#elif (defined(__STDC__) && __STDC__ && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L)
