| 1 | fixes for mingw building
|
|---|
| 2 |
|
|---|
| 3 | From: Mark Spieth <mspieth@digivation.com.au>
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | ---
|
|---|
| 7 | mythtv/configure | 7 ++++++-
|
|---|
| 8 | mythtv/libs/libmythbase/compat.h | 3 ++-
|
|---|
| 9 | mythtv/libs/libmythbase/mythsystemwindows.h | 1 +
|
|---|
| 10 | mythtv/libs/libmythbase/mythtimer.cpp | 2 ++
|
|---|
| 11 | mythtv/libs/libmythbase/test/test.pro | 2 +-
|
|---|
| 12 | mythtv/libs/libmythmetadata/libmythmetadata.pro | 2 +-
|
|---|
| 13 | .../libs/libmythtv/recorders/iptvstreamhandler.cpp | 2 +-
|
|---|
| 14 | .../libs/libmythtv/recorders/rtp/rtpdatapacket.h | 4 ++++
|
|---|
| 15 | 8 files changed, 18 insertions(+), 5 deletions(-)
|
|---|
| 16 |
|
|---|
| 17 | diff --git a/mythtv/configure b/mythtv/configure
|
|---|
| 18 | index 1cbb959..2d704f6 100755
|
|---|
| 19 | --- a/mythtv/configure
|
|---|
| 20 | +++ b/mythtv/configure
|
|---|
| 21 | @@ -4181,7 +4181,12 @@ case $target_os in
|
|---|
| 22 | SLIBSUF=".dll"
|
|---|
| 23 | SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
|
|---|
| 24 | SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
|
|---|
| 25 | - SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
|
|---|
| 26 | + dlltool="${cross_prefix}dlltool"
|
|---|
| 27 | + if check_cmd lib.exe -list ; then
|
|---|
| 28 | + SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
|
|---|
| 29 | + else
|
|---|
| 30 | + SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); $(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
|
|---|
| 31 | + fi
|
|---|
| 32 | SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
|
|---|
| 33 | install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \
|
|---|
| 34 | install -d "$(LIBDIR)"; \
|
|---|
| 35 | diff --git a/mythtv/libs/libmythbase/compat.h b/mythtv/libs/libmythbase/compat.h
|
|---|
| 36 | index 693e1d5..db546c1 100644
|
|---|
| 37 | --- a/mythtv/libs/libmythbase/compat.h
|
|---|
| 38 | +++ b/mythtv/libs/libmythbase/compat.h
|
|---|
| 39 | @@ -186,6 +186,7 @@ inline int statfs(const char* path, struct statfs* buffer)
|
|---|
| 40 | //signals: not tested
|
|---|
| 41 | #define SIGHUP 1
|
|---|
| 42 | #define SIGQUIT 3
|
|---|
| 43 | +#define SIGTRAP 5
|
|---|
| 44 | #define SIGKILL 9
|
|---|
| 45 | #define SIGUSR1 10 // used to force UPnP mediamap rebuild in the backend
|
|---|
| 46 | #define SIGUSR2 12 // used to restart LIRC as required
|
|---|
| 47 | @@ -238,7 +239,7 @@ inline const char *dlerror(void)
|
|---|
| 48 | // getuid/geteuid/setuid - not implemented
|
|---|
| 49 | #define getuid() 0
|
|---|
| 50 | #define geteuid() 0
|
|---|
| 51 | -#define setuid(x)
|
|---|
| 52 | +#define setuid(x) 0
|
|---|
| 53 | #endif // USING_MINGW
|
|---|
| 54 |
|
|---|
| 55 | #if defined(USING_MINGW) && !defined(gmtime_r)
|
|---|
| 56 | diff --git a/mythtv/libs/libmythbase/mythsystemwindows.h b/mythtv/libs/libmythbase/mythsystemwindows.h
|
|---|
| 57 | index 45c6b2c..33f8ed3 100644
|
|---|
| 58 | --- a/mythtv/libs/libmythbase/mythsystemwindows.h
|
|---|
| 59 | +++ b/mythtv/libs/libmythbase/mythsystemwindows.h
|
|---|
| 60 | @@ -3,6 +3,7 @@
|
|---|
| 61 | #ifndef _MYTHSYSTEM_WINDOWS_H_
|
|---|
| 62 | #define _MYTHSYSTEM_WINDOWS_H_
|
|---|
| 63 |
|
|---|
| 64 | +#include <windows.h>
|
|---|
| 65 | #include <signal.h>
|
|---|
| 66 |
|
|---|
| 67 | #include <QWaitCondition>
|
|---|
| 68 | diff --git a/mythtv/libs/libmythbase/mythtimer.cpp b/mythtv/libs/libmythbase/mythtimer.cpp
|
|---|
| 69 | index 9cb3209..65bf64b 100644
|
|---|
| 70 | --- a/mythtv/libs/libmythbase/mythtimer.cpp
|
|---|
| 71 | +++ b/mythtv/libs/libmythbase/mythtimer.cpp
|
|---|
| 72 | @@ -22,6 +22,8 @@
|
|---|
| 73 | // MythTV includes
|
|---|
| 74 | #include "mythtimer.h"
|
|---|
| 75 |
|
|---|
| 76 | +#include <stdint.h>
|
|---|
| 77 | +
|
|---|
| 78 | //#define DEBUG_TIMER_API_USAGE
|
|---|
| 79 | #ifdef DEBUG_TIMER_API_USAGE
|
|---|
| 80 | #undef NDEBUG
|
|---|
| 81 | diff --git a/mythtv/libs/libmythbase/test/test.pro b/mythtv/libs/libmythbase/test/test.pro
|
|---|
| 82 | index d5e3534..43942eb 100644
|
|---|
| 83 | --- a/mythtv/libs/libmythbase/test/test.pro
|
|---|
| 84 | +++ b/mythtv/libs/libmythbase/test/test.pro
|
|---|
| 85 | @@ -2,7 +2,7 @@ include (../../../settings.pro)
|
|---|
| 86 |
|
|---|
| 87 | TEMPLATE = subdirs
|
|---|
| 88 |
|
|---|
| 89 | -SUBDIRS += $$files(test_*)
|
|---|
| 90 | +unix:SUBDIRS += $$files(test_*)
|
|---|
| 91 |
|
|---|
| 92 | unittest.target = test
|
|---|
| 93 | unittest.commands = ../../../programs/scripts/unittests.sh
|
|---|
| 94 | diff --git a/mythtv/libs/libmythmetadata/libmythmetadata.pro b/mythtv/libs/libmythmetadata/libmythmetadata.pro
|
|---|
| 95 | index 843c3a9..4de0f97 100644
|
|---|
| 96 | --- a/mythtv/libs/libmythmetadata/libmythmetadata.pro
|
|---|
| 97 | +++ b/mythtv/libs/libmythmetadata/libmythmetadata.pro
|
|---|
| 98 | @@ -59,9 +59,9 @@ LIBS += -L../libmythfreesurround -lmythfreesurround-$${LIBVERSION}
|
|---|
| 99 | LIBS += -L../../external/FFmpeg/libavcodec -lmythavcodec
|
|---|
| 100 | LIBS += -L../../external/FFmpeg/libavutil -lmythavutil
|
|---|
| 101 | LIBS += -L../../external/FFmpeg/libavformat -lmythavformat
|
|---|
| 102 | +LIBS += -L../../external/libmythbluray -lmythbluray-$${LIBVERSION}
|
|---|
| 103 | LIBS += -L../libmyth -lmyth-$${LIBVERSION}
|
|---|
| 104 | LIBS += -L../libmythtv -lmythtv-$${LIBVERSION}
|
|---|
| 105 | -LIBS += -L../../external/libmythbluray -lmythbluray-$${LIBVERSION}
|
|---|
| 106 | LIBS += -L../../external/FFmpeg/libswscale -lmythswscale
|
|---|
| 107 |
|
|---|
| 108 | # for TagLib
|
|---|
| 109 | diff --git a/mythtv/libs/libmythtv/recorders/iptvstreamhandler.cpp b/mythtv/libs/libmythtv/recorders/iptvstreamhandler.cpp
|
|---|
| 110 | index 254b06b..445be0d 100644
|
|---|
| 111 | --- a/mythtv/libs/libmythtv/recorders/iptvstreamhandler.cpp
|
|---|
| 112 | +++ b/mythtv/libs/libmythtv/recorders/iptvstreamhandler.cpp
|
|---|
| 113 | @@ -219,7 +219,7 @@ void IPTVStreamHandler::run(void)
|
|---|
| 114 | dest_addr.toString().toLatin1().constData());
|
|---|
| 115 | imr.imr_interface.s_addr = htonl(INADDR_ANY);
|
|---|
| 116 | if (setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
|
|---|
| 117 | - &imr, sizeof(imr)) < 0)
|
|---|
| 118 | + (const char*)&imr, sizeof(imr)) < 0)
|
|---|
| 119 | {
|
|---|
| 120 | LOG(VB_GENERAL, LOG_ERR, LOC +
|
|---|
| 121 | "setsockopt - IP_ADD_MEMBERSHIP " + ENO);
|
|---|
| 122 | diff --git a/mythtv/libs/libmythtv/recorders/rtp/rtpdatapacket.h b/mythtv/libs/libmythtv/recorders/rtp/rtpdatapacket.h
|
|---|
| 123 | index 2f16a7d..4f0d338 100644
|
|---|
| 124 | --- a/mythtv/libs/libmythtv/recorders/rtp/rtpdatapacket.h
|
|---|
| 125 | +++ b/mythtv/libs/libmythtv/recorders/rtp/rtpdatapacket.h
|
|---|
| 126 | @@ -6,7 +6,11 @@
|
|---|
| 127 | #ifndef _RTP_DATA_PACKET_H_
|
|---|
| 128 | #define _RTP_DATA_PACKET_H_
|
|---|
| 129 |
|
|---|
| 130 | +#ifdef WIN32
|
|---|
| 131 | +#include <winsock2.h>
|
|---|
| 132 | +#else
|
|---|
| 133 | #include <arpa/inet.h> // for ntohs()/ntohl()
|
|---|
| 134 | +#endif
|
|---|
| 135 |
|
|---|
| 136 | #include "udppacket.h"
|
|---|
| 137 | #include "mythlogging.h"
|
|---|