diff mbox series

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

Message ID 1556125721-32145-3-git-send-email-john.stultz@linaro.org
State New
Headers show
Series libdrm: Patches from AOSP | expand

Commit Message

John Stultz April 24, 2019, 5:08 p.m. UTC
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@collabora.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Alistair Strachan <astrachan@google.com>
Cc: Marissa Wall <marissaw@google.com>
Suggested-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: John Stultz <john.stultz@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(+)

-- 
2.7.4
diff mbox series

Patch

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)