Tim Malseed
07/25/2020, 1:30 AMunique_fd.h
, I get the error 'use of undeclared identifier: android_fdsan_exchange_owner_tag
'
unique_fd.h
(Provided by me)
static void exchange_tag(int fd, uint64_t old_tag, uint64_t new_tag) {
if (android_fdsan_exchange_owner_tag) { // Fails to compile
android_fdsan_exchange_owner_tag(fd, old_tag, new_tag);
}
}
This seems to be because this function is only available on API >= 29:
fdsan.h
(Provided by the Android platform)
#if __ANDROID_API__ >= 29
/*
* Exchange a file descriptor's tag.
*
* Logs and aborts if the fd's tag does not match expected_tag.
*/
void android_fdsan_exchange_owner_tag(int fd, uint64_t expected_tag, uint64_t new_tag) __INTRODUCED_IN(29) __attribute__((__weak__));