From 438414a8c3e67f539f5ecbd901232969846f6d56 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Tue, 29 May 2012 21:36:56 +0100 Subject: [PATCH] Fixes for compilation against VDR 1.7.27. It compiles! --- .gitignore | 1 + Makefile | 2 +- mediafile.c | 11 ++++++----- mvpreceiver.c | 4 +++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 100f728..7b2801e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.o .dependencies *~ +libvdr-vompserver.so diff --git a/Makefile b/Makefile index ef3e4af..aa81064 100644 --- a/Makefile +++ b/Makefile @@ -110,5 +110,5 @@ dist: clean @echo Distribution package created as $(PACKAGE).tgz clean: - rm -f $(OBJS) $(OBJS2) $(DEPFILE) libvdr*.so.* *.tgz core* *~ .standalone vompserver-standalone + rm -f $(OBJS) $(OBJS2) $(DEPFILE) libvdr*.so* *.tgz core* *~ .standalone vompserver-standalone diff --git a/mediafile.c b/mediafile.c index 0138cc3..93bbfca 100644 --- a/mediafile.c +++ b/mediafile.c @@ -18,16 +18,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "mediafile.h" -#include "media.h" #include #include #include #include #include -#include "log.h" - +#include +#include "mediafile.h" +#include "media.h" +#include "log.h" MediaFile::MediaFile(ULONG pid){ @@ -85,7 +85,8 @@ ULONG MediaFile::getMediaType(const char * filename) { Media * MediaFile::createMedia(const char * dirname, const char * filename, bool withURI) { Media * rt=NULL; char *buffer; - asprintf(&buffer, "%s/%s", dirname, filename); + int blen = asprintf(&buffer, "%s/%s", dirname, filename); + if (blen); // keep compiler happy because of unused result and unread variable warnings struct stat st; ULONG mtype=MEDIA_TYPE_UNKNOWN; if (stat(buffer, &st) == 0) { diff --git a/mvpreceiver.c b/mvpreceiver.c index 1fce336..49028b5 100644 --- a/mvpreceiver.c +++ b/mvpreceiver.c @@ -39,8 +39,10 @@ MVPReceiver::MVPReceiver(cChannel* channel, cDevice* device) : cReceiver(channel->Ca(), 0, 7, channel->Vpid(), channel->Ppid(), channel->Apid1(), channel->Apid2(), channel->Dpid1(), channel->Dpid2(), channel->Tpid()) #elif VDRVERSNUM < 10500 : cReceiver(channel->Ca(), 0, channel->Vpid(), channel->Apids(), channel->Dpids(), mergeSpidsTpid(channel->Spids(),channel->Tpid())) -#else +#elif VDRVERSNUM < 10712 : cReceiver(channel->GetChannelID(), 0, channel->Vpid(), channel->Apids(), channel->Dpids(), mergeSpidsTpid(channel->Spids(),channel->Tpid())) +#else +: cReceiver(channel, 0) #endif { logger = Log::getInstance(); -- 2.39.2