[mythtv] Ticket #3062: Freebsd compatibility patches

Nigel Pearson nigel at ind.tansu.com.au
Fri Feb 9 03:15:43 UTC 2007

>>  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?)
> well, they actually are. i was compiling mythtv on an amd64 system,
> and ran into problems with incompatible ioctls.
> it turned out that i redefined the long-long in the pvr150/500 driver
> to 32bits already, because non-64bits-freebsd's don't accept 64-bits
> operations in the kernel.

Aah. Gotcha. It may be an issue on Darwin
if anyone ever gets V4L working, but NetBSD
will probably have the same problem you were
working around.

>>  httprequest.cpp - Could you use the sendfile64() that I wrote for  
>> Darwin
>>  instead?
> i will need to look it up. is it in the same file?

No, in a separate file darwin-sendfile.c

Its compilation is enabled at the end of
on appropriate platforms.

>>  upnputil.h - How about this instead:
>>  {{{
>>  #ifdef __FreeBSD__
>>  #define __suseconds_t_defined
>>  #endif
>>  }}}
> why is this better?

It is saying a feature is defined on the platform,
rather than adding a platform-specific workaround.

(Even better would be if configure #defined it)

Also a matter of taste - I dislike nesting #ifdefs.
Always seems to be harder to maintain in the long run.

Nigel Pearson, nigel at ind.tansu.com.au|"Now the world has gone to bed,
Telstra Net. Eng., Sydney, Australia | Darkness won't engulf my head,
Office: 9202 3900    Fax:  9261 3912 | I can see by infrared,
Mobile: 0408 664435  Home: 9792 6998 | How I hate the night." -Marvin

More information about the mythtv-dev mailing list