We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b875fde + 04185aa commit 66a8461Copy full SHA for 66a8461
stdlib/public/SwiftShims/LibcShims.h
@@ -99,7 +99,13 @@ static inline __swift_size_t _swift_stdlib_malloc_size(const void *ptr) {
99
#elif defined(__linux__) || defined(__CYGWIN__) || defined(__ANDROID__) \
100
|| defined(__HAIKU__) || defined(__FreeBSD__)
101
static inline __swift_size_t _swift_stdlib_malloc_size(const void *ptr) {
102
+#if defined(__ANDROID__)
103
+#if __ANDROID_API__ >= 17
104
+ extern __swift_size_t malloc_usable_size(const void *ptr);
105
+#endif
106
+#else
107
extern __swift_size_t malloc_usable_size(void *ptr);
108
109
return malloc_usable_size(CONST_CAST(void *, ptr));
110
}
111
#elif defined(_WIN32)
0 commit comments