From 4da0956b49cc5bf65bb45d58594e55adbda6013a Mon Sep 17 00:00:00 2001 From: Justin Espedal Date: Thu, 17 Sep 2020 16:58:51 +0900 Subject: [PATCH 1/2] Fix compilation on newer android NDKs __NDK_MAJOR__ is present for NDK 16+. NDK 19+ includes log2f. --- include/config-android.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/config-android.h b/include/config-android.h index 804359e..22a2d33 100644 --- a/include/config-android.h +++ b/include/config-android.h @@ -2,6 +2,12 @@ #define AL_API __attribute__((visibility("protected"))) #define ALC_API __attribute__((visibility("protected"))) +#if defined __has_include +# if __has_include () +# include +# endif +#endif + #ifdef IN_IDE_PARSER /* KDevelop's parser doesn't recognize the C99-standard restrict keyword, but * recent versions (at least 4.5.1) do recognize GCC's __restrict. */ @@ -99,7 +105,7 @@ #define HAVE_MODFF /* Define if we have the log2f function */ -#if defined(HXCPP_ARM64) || defined(HXCPP_CPP11) // Not supporting in Android NDK platform < 18, define when increasing platform +#if __NDK_MAJOR__ > 18 #define HAVE_LOG2F #else /* undef HAVE_LOG2F */ From 94ccc88c84f63f7cf187c81d8b548c78a19dddc1 Mon Sep 17 00:00:00 2001 From: Justin Espedal Date: Thu, 17 Sep 2020 17:44:16 +0900 Subject: [PATCH 2/2] Re-add arm64 check log2f is available in the arm64 headers. --- include/config-android.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/config-android.h b/include/config-android.h index 22a2d33..4f36204 100644 --- a/include/config-android.h +++ b/include/config-android.h @@ -105,7 +105,7 @@ #define HAVE_MODFF /* Define if we have the log2f function */ -#if __NDK_MAJOR__ > 18 +#if defined(HXCPP_ARM64) || __NDK_MAJOR__ > 18 #define HAVE_LOG2F #else /* undef HAVE_LOG2F */