From 0fb8da9a05545cba746e09ffcb8ddcdbf45d0e37 Mon Sep 17 00:00:00 2001 From: Justin Yun Date: Tue, 19 Mar 2024 16:36:08 +0900 Subject: [PATCH] Avoid duplicated definition in llndk-versioning.h Non-vendor modules may define llndk versioning macros manually. Avoid redefining the macros if they are already defined outside of llndk-versioning.h header. Bug: 302113279 Test: m && m cts Change-Id: Ibf984f2f2eed3594c824f2e97e17f2698e0515dd --- libvendorsupport/include_llndk/android/llndk-versioning.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvendorsupport/include_llndk/android/llndk-versioning.h b/libvendorsupport/include_llndk/android/llndk-versioning.h index 8ae56d4c5..58cd18db6 100644 --- a/libvendorsupport/include_llndk/android/llndk-versioning.h +++ b/libvendorsupport/include_llndk/android/llndk-versioning.h @@ -48,7 +48,9 @@ // For non-vendor modules, API_LEVEL_AT_LEAST is replaced with __builtin_available(sdk_api_level) to // guard the API for __INTRODUCED_IN. +#if !defined(API_LEVEL_AT_LEAST) #define API_LEVEL_AT_LEAST(sdk_api_level, vendor_api_level) \ (__builtin_available(android sdk_api_level, *)) +#endif #endif // __ANDROID_VENDOR__