From 846d370420fd075f141cd2e9f69ebe464208545a Mon Sep 17 00:00:00 2001
From: leslie <unknown>
Date: Mon, 15 Mar 2010 16:56:46 +0800
Subject: [PATCH] fix testing compile for vdr 1.7.3+

---
 testing/Makefile | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/testing/Makefile b/testing/Makefile
index dd5c34d..0140ba0 100644
--- a/testing/Makefile
+++ b/testing/Makefile
@@ -23,6 +23,17 @@ DEFINES  = -DAPIVERSNUM=$(APIVERSNUM) -DAPIVERSION='"$(APIVERSION)"' -D_GNU_SOUR
 APIVERSION = $(shell sed -ne '/define APIVERSION/ s/^.*"\(.*\)".*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
 APIVERSNUM = $(shell sed -ne '/define APIVERSNUM/ s/^.[a-zA-Z ]*\([0-9]*\) .*$$/\1/p' $(VDRDIR)/include/vdr/config.h)
 
+### VDR version dependant
+
+# test VDR version
+BYVERS = $(strip $(shell if test $(APIVERSNUM) -ge 010703; then echo "*"; fi))
+# test if PlayTsVideo() exists (e.g. TSplay patch)
+BYTSPL = $(strip $(shell grep -l 'PlayTsVideo' $(VDRDIR)/include/vdr/device.h))
+
+ifneq ($(BYVERS)$(BYTSPL),)
+  DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+endif
+
 ### The object files (add further files here):
 
 OBJS = misc.o log.o override.o data.o crypto.o parse.o system.o system-common.o smartcard.o network.o filter.o version.o
-- 
2.39.5