2016-10-26 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR libstdc++/78110
* libsupc++/new_opa.cc: Don't include <malloc.h> in a free standing
environment. Declare memalign directly in that case.
From-SVN: r241591
+2016-10-26 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR libstdc++/78110
+ * libsupc++/new_opa.cc: Don't include <malloc.h> in a free standing
+ environment. Declare memalign directly in that case.
+
2016-10-26 Jonathan Wakely <jwakely@redhat.com>
* testsuite/experimental/filesystem/iterators/pop.cc: Remove
return nullptr;
}
#elif _GLIBCXX_HAVE_MEMALIGN
+#if _GLIBCXX_HOSTED
#include <malloc.h>
+#else
+extern "C" void *memalign(std::size_t boundary, std::size_t size);
+#endif
#define aligned_alloc memalign
#else
// The C library doesn't provide any aligned allocation functions, declare