]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Fix declaration of posix_memalign for freestanding
authorJonathan Wakely <jwakely@redhat.com>
Fri, 14 Jun 2024 11:10:48 +0000 (12:10 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 14 Jun 2024 14:24:14 +0000 (15:24 +0100)
Thanks to Jérôme Duval for noticing this.

libstdc++-v3/ChangeLog:

* libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Fix declaration of
posix_memalign.

libstdc++-v3/libsupc++/new_opa.cc

index 35606e1c1b3d7982e7931754fcc652d5ca60c2d9..c7c7e7946239c277f1a2ca5947e3f2b884932f9c 100644 (file)
@@ -47,7 +47,7 @@ using std::size_t;
 extern "C"
 {
 # if _GLIBCXX_HAVE_POSIX_MEMALIGN
-  void *posix_memalign(void **, size_t alignment, size_t size);
+  int posix_memalign(void **, size_t alignment, size_t size);
 # elif _GLIBCXX_HAVE_ALIGNED_ALLOC
   void *aligned_alloc(size_t alignment, size_t size);
 # elif _GLIBCXX_HAVE__ALIGNED_MALLOC