Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf69495a authored by S Vasudev Prasad's avatar S Vasudev Prasad
Browse files

NdkMediaFormat.h: Updated to include Android API macros

On host toolchains, Android API macros like __ANDROID_API__ and
__INTRODUCED_IN are not available as 'sys/cdefs.h' is different
between Android and host.
Hence they have been added if they are not previously defined.

Test: Build libmediandk
Bug: 151789258

Change-Id: I74c808a45c718e312bd36db39dafd4bb15a7f37b
parent 23d97888
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -39,6 +39,20 @@
#include <sys/cdefs.h>
#include <sys/types.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

#include "NdkMediaError.h"

__BEGIN_DECLS