[mythtv] Ticket #3062: Freebsd compatibility patches

Nigel Pearson nigel at ind.tansu.com.au
Thu Feb 15 02:15:13 UTC 2007


> cd libmythupnp && make -f Makefile
> WARNING: Failure to find: version.cpp
> echo 'const char *myth_source_version =' '"'`(svnversion
> /usr/home/usleep/mythtv2/mythtv 2>/dev/null) || echo Unknown`'";' >
> .vers.new ; diff .vers.new version.cpp > .vers.diff 2>&1 ; if test -s
> .vers.diff ; then mv -f .vers.new version.cpp ; fi ; rm -f .vers.new
> .vers.diff
> *** Error code 2
>
> Stop in /usr/home/jan/mythtv2/mythtv/libs/libmythupnp.
> *** Error code 1
>
> my guess is that the code is being executed in (t)csh instead of sh (
> even when i run the make command from a sh-shell ). maybe a cleaner
> solution is to create a version.sh and call that from version.pro?

That was my original approach, but having
two files to do one thing seemed wasteful.



One other clarification question. Was this change:

Index: programs/mythbackend/backendutil.cpp
===================================================================
--- programs/mythbackend/backendutil.cpp	(revision 12793)
+++ programs/mythbackend/backendutil.cpp	(working copy)
@@ -1,7 +1,7 @@
#include <cstdlib> // for llabs
#include "mythconfig.h"
-#ifdef CONFIG_DARWIN
+#if defined(CONFIG_DARWIN) || defined(__FreeBSD__)
#include <sys/param.h>
#include <sys/mount.h>
static inline long long int abs(long long int v) { return llabs(v); }

for the headers, or something to do with abs()?



I have now committed 80% of this
(all but mainserver.cpp and backendutil.cpp).

Feel free to svn update and test build!
(though, because I made some further changes
  you will have to merge/edit/revert a little)

--
Nigel Pearson, nigel at ind.tansu.com.au|"People say I'm strange,
Telstra Net. Eng., Sydney, Australia | does it make me a stranger?
Office: 9202 3900    Fax:  9261 3912 | My best friend was born
Mobile: 0408 664435  Home: 9792 6998 |     in a manger"   -DC Talk



More information about the mythtv-dev mailing list