summaryrefslogtreecommitdiff
Diffstat
-rw-r--r--Android.mk2
-rw-r--r--tv_input.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 806233e..1194ffc 100644
--- a/Android.mk
+++ b/Android.mk
@@ -22,6 +22,8 @@ LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SHARED_LIBRARIES := libcutils libutils libtvbinder libbinder libui liblog libhardware
LOCAL_REQUIRED_MODULES := libtvbinder
+LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
+
LOCAL_SRC_FILES := tv_input.cpp \
TvPlay.cpp
diff --git a/tv_input.cpp b/tv_input.cpp
index ac31c34..87106f4 100644
--- a/tv_input.cpp
+++ b/tv_input.cpp
@@ -29,7 +29,11 @@
#include <ui/GraphicBuffer.h>
#include <gralloc_priv.h>
#include <gralloc_helper.h>
+
+#if PLATFORM_SDK_VERSION > 23
#include <gralloc_usage_ext.h>
+#endif
+
#include <hardware/hardware.h>
#include <hardware/aml_screen.h>
#include <linux/videodev2.h>