summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--common.h8
-rw-r--r--libdvbmpeg/ctools.c24
-rw-r--r--server/connectionVTP.c10
-rw-r--r--tools/socket.c2
5 files changed, 44 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index cac5c01..b339c3f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#
# Makefile for a Video Disk Recorder plugin
#
-# $Id: Makefile,v 1.9 2008/02/11 16:13:46 schmirl Exp $
+# $Id: Makefile,v 1.10 2008/03/12 09:36:27 schmirl Exp $
# The official name of this plugin.
# This name will be used in the '-P...' option of VDR to load the plugin.
@@ -116,7 +116,7 @@ endif
### Targets:
libdvbmpeg/libdvbmpegtools.a: libdvbmpeg/*.c libdvbmpeg/*.cc libdvbmpeg/*.h libdvbmpeg/*.hh
- make -C ./libdvbmpeg libdvbmpegtools.a
+ $(MAKE) -C ./libdvbmpeg libdvbmpegtools.a
libvdr-$(PLUGIN)-client.so: $(CLIENTOBJS) $(COMMONOBJS) libdvbmpeg/libdvbmpegtools.a
@@ -136,4 +136,4 @@ dist: clean
clean:
@-rm -f $(COMMONOBJS) $(CLIENTOBJS) $(SERVEROBJS) $(DEPFILE) *.so *.tgz core* *~
- make -C ./libdvbmpeg clean
+ $(MAKE) -C ./libdvbmpeg clean
diff --git a/common.h b/common.h
index 1d14883..2565604 100644
--- a/common.h
+++ b/common.h
@@ -1,10 +1,16 @@
/*
- * $Id: common.h,v 1.8 2007/04/24 10:50:13 schmirl Exp $
+ * $Id: common.h,v 1.9 2008/03/12 09:36:27 schmirl Exp $
*/
#ifndef VDR_STREAMDEV_COMMON_H
#define VDR_STREAMDEV_COMMON_H
+/* FreeBSD has it's own version of isnumber(),
+ but VDR's version is incompatible */
+#ifdef __FreeBSD__
+#undef isnumber
+#endif
+
#include <vdr/tools.h>
#include <vdr/plugin.h>
diff --git a/libdvbmpeg/ctools.c b/libdvbmpeg/ctools.c
index 76ba48d..4766ea2 100644
--- a/libdvbmpeg/ctools.c
+++ b/libdvbmpeg/ctools.c
@@ -2060,7 +2060,11 @@ void split_mpg(char *name, uint64_t size)
if (break_up_filename(name,base_name,path,ext) < 0) exit(1);
+#ifdef __FreeBSD__
+ if ( (fdin = open(name, O_RDONLY)) < 0){
+#else
if ( (fdin = open(name, O_RDONLY|O_LARGEFILE)) < 0){
+#endif
fprintf(stderr,"Can't open %s\n",name);
exit(1);
}
@@ -2101,8 +2105,12 @@ void split_mpg(char *name, uint64_t size)
sprintf(new_name,"%s-%03d.%s",base_name,i,ext);
printf("writing %s\n",new_name);
+#ifdef __FreeBSD__
+ if ( (fdout = open(new_name,O_WRONLY|O_CREAT|O_TRUNC,
+#else
if ( (fdout = open(new_name,O_WRONLY|O_CREAT|O_TRUNC
|O_LARGEFILE,
+#endif
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|
S_IROTH|S_IWOTH)) < 0){
fprintf(stderr,"Can't open %s\n",new_name);
@@ -2114,8 +2122,12 @@ void split_mpg(char *name, uint64_t size)
sprintf(new_name,"%s-%03d.%s",base_name,i,ext);
printf("writing %s\n",new_name);
+#ifdef __FreeBSD__
+ if ( (fdout = open(new_name,O_WRONLY|O_CREAT|O_TRUNC,
+#else
if ( (fdout = open(new_name,O_WRONLY|O_CREAT|O_TRUNC
|O_LARGEFILE,
+#endif
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|
S_IROTH|S_IWOTH)) < 0){
fprintf(stderr,"Can't open %s\n",new_name);
@@ -2144,7 +2156,11 @@ void cut_mpg(char *name, uint64_t size)
if (break_up_filename(name,base_name,path,ext) < 0) exit(1);
+#ifdef __FreeBSD__
+ if ( (fdin = open(name, O_RDONLY)) < 0){
+#else
if ( (fdin = open(name, O_RDONLY|O_LARGEFILE)) < 0){
+#endif
fprintf(stderr,"Can't open %s\n",name);
exit(1);
}
@@ -2182,8 +2198,12 @@ void cut_mpg(char *name, uint64_t size)
sprintf(new_name,"%s-1.%s",base_name,ext);
printf("writing %s\n",new_name);
+#ifdef __FreeBSD__
+ if ( (fdout = open(new_name,O_WRONLY|O_CREAT|O_TRUNC,
+#else
if ( (fdout = open(new_name,O_WRONLY|O_CREAT|O_TRUNC
|O_LARGEFILE,
+#endif
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|
S_IROTH|S_IWOTH)) < 0){
fprintf(stderr,"Can't open %s\n",new_name);
@@ -2195,8 +2215,12 @@ void cut_mpg(char *name, uint64_t size)
sprintf(new_name,"%s-2.%s",base_name,ext);
printf("writing %s\n",new_name);
+#ifdef __FreeBSD__
+ if ( (fdout = open(new_name,O_WRONLY|O_CREAT|O_TRUNC,
+#else
if ( (fdout = open(new_name,O_WRONLY|O_CREAT|O_TRUNC
|O_LARGEFILE,
+#endif
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|
S_IROTH|S_IWOTH)) < 0){
fprintf(stderr,"Can't open %s\n",new_name);
diff --git a/server/connectionVTP.c b/server/connectionVTP.c
index 5ca2df6..60237ea 100644
--- a/server/connectionVTP.c
+++ b/server/connectionVTP.c
@@ -1,5 +1,5 @@
/*
- * $Id: connectionVTP.c,v 1.15 2007/09/21 12:45:31 schmirl Exp $
+ * $Id: connectionVTP.c,v 1.16 2008/03/12 09:36:27 schmirl Exp $
*/
#include "server/connectionVTP.h"
@@ -186,7 +186,11 @@ bool cLSTEHandler::Next(bool &Last)
case Event:
if (m_Event != NULL) {
m_State = Title;
+#ifdef __FreeBSD__
+ return m_Client->Respond(-215, "E %u %d %d %X", m_Event->EventID(),
+#else
return m_Client->Respond(-215, "E %u %ld %d %X", m_Event->EventID(),
+#endif
m_Event->StartTime(), m_Event->Duration(),
m_Event->TableID());
} else {
@@ -225,7 +229,11 @@ bool cLSTEHandler::Next(bool &Last)
case Vps:
m_State = EndEvent;
if (m_Event->Vps())
+#ifdef __FreeBSD__
+ return m_Client->Respond(-215, "V %d", m_Event->Vps());
+#else
return m_Client->Respond(-215, "V %ld", m_Event->Vps());
+#endif
else
return Next(Last);
break;
diff --git a/tools/socket.c b/tools/socket.c
index e9266c5..7f4ce0a 100644
--- a/tools/socket.c
+++ b/tools/socket.c
@@ -153,5 +153,5 @@ bool cTBSocket::Shutdown(int how) {
bool cTBSocket::SetDSCP(void) {
int dscp = STREAMDEV_DSCP;
- return ::setsockopt(*this, SOL_IP, IP_TOS, &dscp, sizeof(dscp)) != -1;
+ return ::setsockopt(*this, IPPROTO_IP, IP_TOS, &dscp, sizeof(dscp)) != -1;
}