[PATCH 2/6 v2] libdrm: Android.mk: Add minimal Android platform check

John Stultz john.stultz at linaro.org
Wed Apr 24 17:08:37 UTC 2019


Add a check to error out on Android version K(4.4) or
lower.

This is due to dependency added in a previous commit on mmap64,
which was introduced with Android L.

Cc: Emil Velikov <emil.velikov at collabora.com>
Cc: Sean Paul <seanpaul at chromium.org>
Cc: Alistair Strachan <astrachan at google.com>
Cc: Marissa Wall <marissaw at google.com>
Suggested-by: Emil Velikov <emil.velikov at collabora.com>
Signed-off-by: John Stultz <john.stultz at linaro.org>
---
NOTE: This change was suggested by Emil, and I've implemented
it as suggested, but due to the fact that the Android.mk files
are no longer usable with AOSP/master, I'm not able to test
this change. Help in validating would be appreciated.
---
 Android.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Android.mk b/Android.mk
index 1b77c53..0ab6f0f 100644
--- a/Android.mk
+++ b/Android.mk
@@ -21,6 +21,11 @@
 # IN THE SOFTWARE.
 #
 
+LIBDRM_ANDROID_MAJOR_VERSION := $(word 1, $(subst ., , $(PLATFORM_VERSION)))
+ifneq ($(filter 2 4, $(LIBDRM_ANDROID_MAJOR_VERSION)),)
+$(error "Android 4.4 and earlier not supported")
+endif
+
 LIBDRM_COMMON_MK := $(call my-dir)/Android.common.mk
 
 LOCAL_PATH := $(call my-dir)
-- 
2.7.4



More information about the dri-devel mailing list