[compiler-rt] 0cfe0a7 - scudo: Fix the build of wrappers_c_test.cpp on Android.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 5 11:15:17 PST 2019


Author: Peter Collingbourne
Date: 2019-12-05T11:15:00-08:00
New Revision: 0cfe0a7bb0e10a96c3c98891961d37160a931d20

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

LOG: scudo: Fix the build of wrappers_c_test.cpp on Android.

The Android headers don't provide a declaration of valloc or pvalloc, so we
need to declare them ourselves.

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

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp b/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
index 99e7aa2fa21c..03f64c871837 100644
--- a/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
+++ b/compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
@@ -20,6 +20,8 @@ void malloc_disable(void);
 int malloc_iterate(uintptr_t base, size_t size,
                    void (*callback)(uintptr_t base, size_t size, void *arg),
                    void *arg);
+void *valloc(size_t size);
+void *pvalloc(size_t size);
 }
 
 // Note that every C allocation function in the test binary will be fulfilled


        


More information about the llvm-commits mailing list