scudo: Fix the build of wrappers_c_test.cpp on Android.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 19 Nov 2019 23:22:09 +0000 (15:22 -0800)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 5 Dec 2019 19:15:00 +0000 (11:15 -0800)
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

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

index 99e7aa2..03f64c8 100644 (file)
@@ -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