Message ID | 20191018112721.GA21462@redhat.com |
---|---|
State | New |
Headers | show |
Series | PR libstdc++/92143 adjust for OS X aligned_alloc behaviour | expand |
diff --git a/libstdc++-v3/libsupc++/new_opa.cc b/libstdc++-v3/libsupc++/new_opa.cc index aa5d2e14455..80eb343a1c8 100644 --- a/libstdc++-v3/libsupc++/new_opa.cc +++ b/libstdc++-v3/libsupc++/new_opa.cc @@ -108,9 +108,10 @@ operator new (std::size_t sz, std::align_val_t al) sz = 1; #if _GLIBCXX_HAVE_ALIGNED_ALLOC -# ifdef _AIX +# if defined _AIX || defined __APPLE__ /* AIX 7.2.0.0 aligned_alloc incorrectly has posix_memalign's requirement - * that alignment is a multiple of sizeof(void*). */ + * that alignment is a multiple of sizeof(void*). + * OS X 10.15 has the same requirement. */ if (align < sizeof(void*)) align = sizeof(void*); # endif