]> 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>
Mon, 17 Jun 2024 10:37:54 +0000 (11:37 +0100)
Thanks to Jérôme Duval for noticing this.

libstdc++-v3/ChangeLog:

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

(cherry picked from commit 161efd677458f20d13ee1018a4d5e3964febd508)

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

index ae01166cae3be1376f35e14fdc3e05197827b756..def6c8de79d49655ab08e016a99ff06e91a6dd00 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