pkubaj created this revision.
pkubaj added reviewers: adalava, nemanjai.
Herald added subscribers: shchenz, kbarton, krytarowski.
pkubaj requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Fix for https://github.com/llvm/llvm-project/issues/53085


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117972

Files:
  clang/lib/Headers/ppc_wrappers/mm_malloc.h


Index: clang/lib/Headers/ppc_wrappers/mm_malloc.h
===================================================================
--- clang/lib/Headers/ppc_wrappers/mm_malloc.h
+++ clang/lib/Headers/ppc_wrappers/mm_malloc.h
@@ -19,7 +19,11 @@
 #ifndef __cplusplus
 extern int posix_memalign (void **, size_t, size_t);
 #else
+#if defined(__linux__)
 extern "C" int posix_memalign (void **, size_t, size_t) throw ();
+#elif defined(__FreeBSD__)
+extern "C" int posix_memalign (void **, size_t, size_t);
+#endif
 #endif
 
 static __inline void *


Index: clang/lib/Headers/ppc_wrappers/mm_malloc.h
===================================================================
--- clang/lib/Headers/ppc_wrappers/mm_malloc.h
+++ clang/lib/Headers/ppc_wrappers/mm_malloc.h
@@ -19,7 +19,11 @@
 #ifndef __cplusplus
 extern int posix_memalign (void **, size_t, size_t);
 #else
+#if defined(__linux__)
 extern "C" int posix_memalign (void **, size_t, size_t) throw ();
+#elif defined(__FreeBSD__)
+extern "C" int posix_memalign (void **, size_t, size_t);
+#endif
 #endif
 
 static __inline void *
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to