Fix get_device_api_level_inlines.h in versioner
This commit fixes an inline and non-inline mismatch error caused by `get_device_api_level_inlines.h`. Versioner includes both `android/api-level.h` and `bits/get_device_api_level_inlines.h` in the test. When __ANDROID_API__ is greater than or equal to __ANDROID_API_Q__, `android/api-level.h` declares a non-inline `android_get_device_api_level()`. On the contrary, `bits/get_device_api_level_inlines.h` defines a static inline `android_get_device_api_level()` function. These conflicting declarations result in compilation error. This commit fixes the problem by guarding full `get_device_api_level_inline.h` with `#if defined(__BIONIC_GET_DEVICE_API_LEVEL_INLINE)` so that `get_device_api_level_inline.h` can be no-op when it is not properly included. Note: This is not revealed until recently because API level 29 is added in Mar 14 and the prebuilt binary for versioner hasn't been updated. Test: ./bionic/tools/versioner/run_tests.py Change-Id: Ia7d5fbdcaf3d98787e60780f6cff2a24016324f5
Loading
Please sign in to comment