diff options
| author | 2021-01-08 14:25:31 -0500 | |
|---|---|---|
| committer | 2021-01-14 12:02:31 -0500 | |
| commit | 726a550804ef4fbed2d0a4067d598a322ec6d1f3 (patch) | |
| tree | bacf28e4e203fa659c575ab910467223da166f5e /include/android/imagedecoder.h | |
| parent | 78859b42b5697ca1165d14fe23aa4b0e2f3141cb (diff) | |
Support building libjnigraphics on the host
Bug: 169137236
Test: SANITIZE_HOST=address make imagedecoder_fuzzer
Along with a change in frameworks/base
(I0ffc4e90b4083db79fbb12012e2e1284206b43e3), this will make it possible
to run imagedecoder_fuzzer on the host, for faster fuzzing.
imagedecoder.h:
- define __ANDROID_API__ and __INTRODUCED_IN on non-Android systems, so
methods can be called on those systems.
bitmap.h:
- define __ANDROID_API__ and __INTRODUCED_IN on non-Android systems, so
methods can be called on those systems.
- include <stddef.h>, which is needed on non-Android systems for size_t.
- on Android, unguard types and enums for easier opportunistic usage via
dlsym.
nativewindow/Android.bp
- make libnativewindow_headers host_supported, so that libjnigraphics
can access android/data_space.h
Change-Id: Iefdb4132d6f10f9164be85f4dc6e11883f6fd37e
Diffstat (limited to 'include/android/imagedecoder.h')
| -rw-r--r-- | include/android/imagedecoder.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/android/imagedecoder.h b/include/android/imagedecoder.h index 6fcc9b973d..fcc0b9b447 100644 --- a/include/android/imagedecoder.h +++ b/include/android/imagedecoder.h @@ -51,6 +51,20 @@ #include <android/rect.h> #include <stdint.h> +#ifndef __ANDROID__ + // Value copied from 'bionic/libc/include/android/api-level.h' which is not available on + // non Android systems. It is set to 10000 which is same as __ANDROID_API_FUTURE__ value. + #ifndef __ANDROID_API__ + #define __ANDROID_API__ 10000 + #endif + + // Value copied from 'bionic/libc/include/android/versioning.h' which is not available on + // non Android systems + #ifndef __INTRODUCED_IN + #define __INTRODUCED_IN(api_level) + #endif +#endif + #ifdef __cplusplus extern "C" { #endif |