 diff --git a/include/proxsuite/linalg/veg/memory/alloc.hpp b/include/proxsuite/linalg/veg/memory/alloc.hpp
-index eb3f19a..a77b2c2 100644
+index eb3f19a..89d5fbd 100644
 --- a/include/proxsuite/linalg/veg/memory/alloc.hpp
 +++ b/include/proxsuite/linalg/veg/memory/alloc.hpp
 @@ -12,6 +12,7 @@

 #include <malloc.h> // ::malloc_usable_size
 #else
 #include <malloc/malloc.h>
@@ -60,10 +61,12 @@ VEG_INLINE auto
 aligned_alloc(usize align, usize size) noexcept -> void*
 {
   usize const mask = align - 1;

+#if defined(_WIN32)
   return _aligned_malloc((size + mask) & ~mask, align);
+#elif defined(__APPLE__)
+  return _::_aligned_alloc(align, (size + mask) & ~mask);
+#else
+  return std::aligned_alloc(align, (size + mask) & ~mask);
 #endif
