util: refactor to use DETECT_OS_ANDROID
except leaving u_endian.h behind to use __ANDROID__ directly to be consistent with the rest in that file, which deserves a different refactor Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Reviewed-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374>
This commit is contained in:
@@ -128,7 +128,7 @@ os_malloc_aligned_fd(size_t size, size_t alignment, int *fd, char const *fd_name
|
||||
if(mem_fd < 0)
|
||||
return NULL;
|
||||
|
||||
#if defined(HAVE_MEMFD_CREATE) || defined(ANDROID)
|
||||
#if defined(HAVE_MEMFD_CREATE) || DETECT_OS_ANDROID
|
||||
// Seal fd, so no one can grow or shrink the memory.
|
||||
if (fcntl(mem_fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_GROW | F_SEAL_SEAL) != 0)
|
||||
goto fail;
|
||||
|
||||
Reference in New Issue
Block a user