  #include <malloc.h> // ::malloc_usable_size
  #else
  #include <malloc/malloc.h>
-@@ -60,10 +61,12 @@ VEG_INLINE auto
+@@ -22,6 +23,19 @@
+ namespace proxsuite {
+ namespace linalg {
+ namespace veg {
++
++#ifdef __APPLE__
++namespace _ {
++
++VEG_INLINE auto
++_aligned_alloc(size_t alignment, size_t size) -> void*
++{
++  return aligned_alloc(alignment, size);
++}
++
++}
++#endif
++
+ namespace mem {
+ enum struct CopyAvailable
+ {
+@@ -60,10 +74,12 @@ VEG_INLINE auto
  aligned_alloc(usize align, usize size) noexcept -> void*
  {
    usize const mask = align - 1;

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

+#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
