Skip to content

Commit a52cd7e

Browse files
author
Jooyung Han
committed
Use __builtin_available guard
Bug: 362658565 Test: m Change-Id: I2fa5d366b591afa878f62ba39f2831e48a6df5cd
1 parent e57dca0 commit a52cd7e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

libs/ui/Gralloc5.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <aidlcommonsupport/NativeHandle.h>
2424
#include <android/binder_manager.h>
2525
#include <android/hardware/graphics/mapper/utils/IMapperMetadataTypes.h>
26-
#include <android/llndk-versioning.h>
2726
#include <binder/IPCThreadState.h>
2827
#include <dlfcn.h>
2928
#include <ui/FatVector.h>
@@ -91,7 +90,7 @@ static void *loadIMapperLibrary() {
9190
}
9291

9392
void* so = nullptr;
94-
if API_LEVEL_AT_LEAST (__ANDROID_API_V__, 202404) {
93+
if (__builtin_available(android __ANDROID_API_V__, *)) {
9594
so = AServiceManager_openDeclaredPassthroughHal("mapper", mapperSuffix.c_str(),
9695
RTLD_LOCAL | RTLD_NOW);
9796
} else {

0 commit comments

Comments
 (0)