Opened 20 years ago
Closed 19 years ago
#3062 closed enhancement (fixed)
Freebsd compatibility patches
| Reported by: | Owned by: | Isaac Richards | |
|---|---|---|---|
| Priority: | minor | Milestone: | unknown |
| Component: | mythtv | Version: | head |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
a couple of things to make compiling mythtv on freebsd possible.
Attachments (2)
Change History (15)
comment:1 by , 20 years ago
| Type: | defect → enhancement |
|---|
comment:2 by , 20 years ago
comment:3 by , 20 years ago
fixed the yuv2rgb patch, added patches to httprequest.cpp and FrameAnalyer.h
comment:5 by , 20 years ago
added patches:
libs/libmythupnp/upnputil.h programs/mythbackend/backendutil.cpp
mythtv-svn now compiles on FreeBSD with these patches.
comment:6 by , 20 years ago
videodev_myth.h - Patch is good on OS X 10.4. (although I am curious as to why it is needed. Yes the current code is non-portable, but are long longs not 64bit on FreeBSD?)
mpegrecorder.cpp - Doesn't FreeBSD have select() ? (I thought if OS X does, FreeBSD would too?)
mainserver.cpp - What is the problem with the lock?
videoout_xv.cpp - I suspect NetBSD also lacks malloc.h. It should probably be:
#ifdef _linux_ #include <malloc.h> #endif
yuv2rgb.cpp - Don't see the need. The values should all be small positives (e.g. UCHAR_MAX is 255)
httprequest.cpp - Could you use the sendfile64() that I wrote for Darwin instead?
upnputil.h - How about this instead:
#ifdef __FreeBSD__ #define __suseconds_t_defined #endif
version.pro - Curious. What is the behavior without the sh -c ?
Sorry if I seem picky here. I just want to understand these, and make sure it all works for Linux, *BSD, Darwin, and maybe even Windows.
by , 20 years ago
| Attachment: | mythtv-freebsd.diff added |
|---|
comment:7 by , 20 years ago
Nigel,
adjusted videoout_xv.cpp patch, removed yuv2rgb.cpp patch ( is only failing on amd64-fbsd? ), adjusted upnputil.h patch, used sendfile64 in httprequest.cpp.
freebsd compatibility would be very welcome.
regards,
usleep
comment:8 by , 20 years ago
by , 20 years ago
| Attachment: | yuv2rgb.cpp.diff added |
|---|
comment:9 by , 20 years ago
Added a refined patch for yuv2rgb.cpp, needed for AMD64/FreeBSD compile.
Somehow the compiler casts UCHAR_MAX ( which is defined as 0xff at the base ) to an unsigned int, while the second parameter to std::min ( std::max ) returns a signed int. std::min can not cope. The problem does not occur on i386.
comment:10 by , 20 years ago
Oh, and the yuv2rgb.cpp problem also occurs on openbsd ( this is where the patch came from ):
comment:13 by , 19 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
I haven't heard any other FreeBSD build problems, so I assume this can be closed.

the yuv2rgb patch is no good: the #ifdef needs to be around the RGBOUT macro, not within.