Ticket #6597: 6597-hdhr-win32.patch
| File 6597-hdhr-win32.patch, 4.4 KB (added by , 16 years ago) |
|---|
-
libs/libmythhdhomerun/libmythhdhomerun.pro
9 9 target.path = $${LIBDIR} 10 10 INSTALLS = target 11 11 12 mingw:LIBS += -lws2_32 -liphlpapi -lpthread 13 12 14 QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) 13 15 14 16 HEADERS += hdhomerun_channelscan.h hdhomerun_debug.h hdhomerun_discover.h -
libs/libmythhdhomerun/hdhomerun_os.h
23 23 24 24 #if defined(__WINDOWS__) 25 25 #define _WINSOCKAPI_ 26 // MinGW lacks wspiapi, so remove dependency by setting minimum WINVER to WinXP 27 #define WINVER 0x0501 26 28 #include <windows.h> 27 29 #include <winsock2.h> 28 30 #include <ws2tcpip.h> 29 #include <wspiapi.h>31 //#include <wspiapi.h> 30 32 #include <stdlib.h> 31 33 #include <stdio.h> 32 34 #include <stdarg.h> … … 78 80 #endif 79 81 80 82 typedef int bool_t; 83 /* Use MinGW includes instead of these... 81 84 typedef signed __int8 int8_t; 82 85 typedef signed __int16 int16_t; 83 86 typedef signed __int32 int32_t; … … 88 91 typedef unsigned __int64 uint64_t; 89 92 typedef HANDLE pthread_t; 90 93 typedef HANDLE pthread_mutex_t; 94 */ 95 #include <stdint.h> 96 #include <pthread.h> 91 97 98 // Avoid #define conflicts by limiting scope to non-c++ 99 #ifndef __cplusplus 92 100 #define socklen_t int 93 101 #define close closesocket 94 102 #define sock_getlasterror WSAGetLastError() 95 103 #define sock_getlasterror_socktimeout (WSAGetLastError() == WSAETIMEDOUT) 96 #define va_copy(x, y) x = y104 //#define va_copy(x, y) x = y 97 105 #define atoll _atoi64 98 106 #define strdup _strdup 99 107 #define strcasecmp _stricmp … … 104 112 #define sleep(sec) Sleep((sec)*1000) 105 113 #define THREAD_FUNC_PREFIX DWORD WINAPI 106 114 #define SIGPIPE SIGABRT 115 #endif 107 116 108 117 static inline uint64_t getcurrenttime(void) 109 118 { … … 118 127 return setsockopt(s, level, optname, (char *)&t, sizeof(t)); 119 128 } 120 129 130 /* MythTV uses pthreads lib instead of these... 121 131 static inline int pthread_create(pthread_t *tid, void *attr, LPTHREAD_START_ROUTINE start, void *arg) 122 132 { 123 133 *tid = CreateThread(NULL, 0, start, arg, 0, NULL); … … 154 164 { 155 165 ReleaseMutex(*mutex); 156 166 } 167 */ 157 168 158 169 #else /* !defined(__WINDOWS__) */ 159 170 -
libs/libmythtv/hdhrchannel.cpp
7 7 // C includes 8 8 #include <unistd.h> 9 9 #include <sys/types.h> 10 #ifndef USING_MINGW 10 11 #include <sys/socket.h> 11 12 #include <netinet/in.h> 12 13 #include <arpa/inet.h> 13 14 #include <netdb.h> 15 #endif 14 16 #include <sys/time.h> 15 17 #include <fcntl.h> 16 18 … … 44 46 45 47 /* Otherwise, is it a valid IP address? */ 46 48 struct in_addr address; 49 #ifdef USING_MINGW 50 address.s_addr = inet_addr(device.toLatin1().data()); 51 if ((address.s_addr != INADDR_NONE) && (address.s_addr != INADDR_ANY)) 52 #else 47 53 if (inet_aton(device.toLatin1().constData(), &address)) 54 #endif 48 55 { 49 56 _device_ip = ntohl(address.s_addr); 50 57 return; -
libs/libmythtv/hdhrrecorder.cpp
9 9 #include <pthread.h> 10 10 #include <unistd.h> 11 11 #include <sys/types.h> 12 #ifndef USING_MINGW 12 13 #include <sys/socket.h> 13 14 #include <netinet/in.h> 14 15 #include <arpa/inet.h> 15 16 #include <netdb.h> 17 #endif 16 18 #include <sys/time.h> 17 19 #include <fcntl.h> 18 20 -
libs/libmythtv/hdhrsignalmonitor.cpp
7 7 #include <pthread.h> 8 8 #include <fcntl.h> 9 9 #include <unistd.h> 10 #ifndef USING_MINGW 10 11 #include <sys/select.h> 12 #endif 11 13 12 14 #include "mythcontext.h" 13 15 #include "mythdbcon.h" -
libs/libmythtv/libmythtv.pro
581 581 SOURCES += videoout_d3d.cpp 582 582 583 583 LIBS += -lpthread 584 LIBS += -lws2_32 584 585 } 585 586 586 587 # install headers required by mytharchive
