[libcxx-commits] [libcxxabi] f8c2b0d - [libc++][Android] Include cstdlib to define __BIONIC__

Ryan Prichard via libcxx-commits libcxx-commits at lists.llvm.org
Fri Dec 9 15:16:37 PST 2022


Author: Ryan Prichard
Date: 2022-12-09T15:16:20-08:00
New Revision: f8c2b0d249afc58db87c6678e0db4c0a53774d2d

URL: https://github.com/llvm/llvm-project/commit/f8c2b0d249afc58db87c6678e0db4c0a53774d2d
DIFF: https://github.com/llvm/llvm-project/commit/f8c2b0d249afc58db87c6678e0db4c0a53774d2d.diff

LOG: [libc++][Android] Include cstdlib to define __BIONIC__

__ANDROID__ is a built-in compiler macro, but __BIONIC__ is defined by
the libc header.

Reviewed By: #libc_abi, compnerd

Differential Revision: https://reviews.llvm.org/D137128

Added: 
    

Modified: 
    libcxxabi/test/forced_unwind4.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxxabi/test/forced_unwind4.pass.cpp b/libcxxabi/test/forced_unwind4.pass.cpp
index 0d22657f6cf2b..2864426ca16dc 100644
--- a/libcxxabi/test/forced_unwind4.pass.cpp
+++ b/libcxxabi/test/forced_unwind4.pass.cpp
@@ -13,6 +13,8 @@
 // the child_thread. This test ensures sigretrun is handled correctly (see:
 // UnwindCursor<A, R>::setInfoForSigReturn).
 
+#include <cstdlib> // defines __BIONIC__
+
 // Android/Bionic does not support pthread_cancel.
 #ifdef __BIONIC__
 int main() {


        


More information about the libcxx-commits mailing list