[mythtv] #undef __STRICT_ANSI__

Chris Pinkham cpinkham at bc2va.org
Mon Sep 6 20:25:15 UTC 2010


I'm running CentOS on my MythTV systems and ran into this issue a while
back as well.  Originally it was just one file that wouldn't compile and
I committed a fix for that.  Lately there were a couple more, then
I think the flood gates opened.

I ended up editting the following header files rather than messing with
the MythTV source:

/usr/include/asm/types.h
/usr/include/linux/types.h

In asm/types.h, I made the following change:

// MythTV fails with the line below, so make a version without
// the __STRICT_ANSI__
//#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#if defined(__GNUC__)
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
#endif

In linux/types.h, it was the following:

// MythTV fails with the line below, so make a version without
// the __STRICT_ANSI__
//#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#if defined(__GNUC__)
typedef __u64 __bitwise __le64;
typedef __u64 __bitwise __be64;
#endif

I found several people on the net complaining about broken kernel headers
and my original single-file fix was based on a patch that was made in
one of the libav* ffmpeg libs a while back.

YMMV, but modifying these headers is what I did to get MythTV trunk head
working on my system with older 2.6.18 kernel headers installed.  It's not
a long-term solution (and I wonder why there haven't been many complaints),
but it was easy to modify 2 files vs who knows how many in MythTV and
having to strip out those changes whenever I commit something.

--
Chris


More information about the mythtv-dev mailing list