[mythtv] MingW commits broke OS X builds
Nigel Pearson
nigel at ind.tansu.com.au
Tue Dec 11 23:26:19 UTC 2007
Before someone else reports it, [15120] broke OS X compilation.
g++ ... util.cpp
util.cpp: In function 'long long int getDiskSpace(const QString&,
long long int&, long long int&)':
util.cpp:455: error: aggregate 'statfs statbuf' has incomplete type
and cannot be defined
util.cpp:466: error: invalid use of undefined type 'struct statfs'
util.cpp:455: error: forward declaration of 'struct statfs'
...
g++ ... upnputil.cpp
/usr/include/net/if.h:213: error: field 'ifru_addr' has incomplete type
/usr/include/net/if.h:214: error: field 'ifru_dstaddr' has incomplete
type
/usr/include/net/if.h:215: error: field 'ifru_broadaddr' has
incomplete type
/usr/include/net/if.h:250: error: field 'ifra_addr' has incomplete type
/usr/include/net/if.h:251: error: field 'ifra_broadaddr' has
incomplete type
/usr/include/net/if.h:252: error: field 'ifra_mask' has incomplete type
/usr/include/net/if.h:318: error: field 'addr' has incomplete type
/usr/include/net/if.h:319: error: field 'dstaddr' has incomplete type
Here are my proposed #include changes:
% svn diff libs/libmyth/util.cpp
Index: libs/libmyth/util.cpp
===================================================================
--- libs/libmyth/util.cpp (revision 15129)
+++ libs/libmyth/util.cpp (working copy)
@@ -25,7 +25,6 @@
# include <sys/sysinfo.h>
# else
# include <sys/param.h>
-//# include <sys/mount.h>
# ifdef CONFIG_CYGWIN
# include <sys/statfs.h>
# else // if !CONFIG_CYGWIN
@@ -52,6 +51,7 @@
#ifdef CONFIG_DARWIN
#include <mach/mach.h>
+#include <sys/mount.h> // for struct statfs
#endif
#ifdef USE_LIRC
% svn diff libs/libmythupnp/upnputil.cpp
Index: libs/libmythupnp/upnputil.cpp
===================================================================
--- libs/libmythupnp/upnputil.cpp (revision 15129)
+++ libs/libmythupnp/upnputil.cpp (working copy)
@@ -12,11 +12,15 @@
#include <sys/types.h>
#include <sys/time.h>
+#include "mythconfig.h"
+
#ifndef USING_MINGW
-#include <net/if.h>
+# ifdef CONFIG_DARWIN
+# include <sys/socket.h>
+# endif
+# include <net/if.h>
#endif // USING_MINGW
-#include "mythconfig.h" // for HAVE_GETIFADDRS
#ifdef HAVE_GETIFADDRS
#include <ifaddrs.h>
#endif
--
Nigel Pearson, nigel at ind.tansu.com.au|"Things you own-
Telstra Net. Eng., Sydney, Australia | end up owning you"
Office: 9202 3900 Fax: 9261 3912 | Tyler,
Mobile: 0408 664435 Home: 9792 6998 | Fight Club
More information about the mythtv-dev
mailing list