freebsd-ports/multimedia/xbmc/files/patch-xbmc__visualizations__XBMCProjectM__libprojectM__fftsg.cpp
Bernhard Froehlich b7207fae88 - Update to 11.0b1
- Add fix to build fine with CLANG
- Remove USE_LDCONFIG because xbmc uses hardcoded paths

PR:		ports/163796
Submitted by:	Mickael Maillot <mickael.maillot@gmail.com> (maintainer)
2012-01-18 12:05:48 +00:00

27 lines
908 B
C++

--- ./xbmc/visualizations/XBMCProjectM/libprojectM/fftsg.cpp.orig 2011-12-23 04:12:21.000000000 +0100
+++ ./xbmc/visualizations/XBMCProjectM/libprojectM/fftsg.cpp 2012-01-02 10:14:38.000000000 +0100
@@ -782,6 +782,16 @@
#include <stdio.h>
#include <stdlib.h>
#define cdft_thread_t HANDLE
+#ifdef __FreeBSD__
+#define cdft_thread_create(thp,func,argp) { \
+ LONG thid; \
+ *(thp) = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) func, (LPVOID) argp, 0, &thid); \
+ if (*(thp) == 0) { \
+ fprintf(stderr, "cdft thread error\n"); \
+ exit(1); \
+ } \
+}
+#else
#define cdft_thread_create(thp,func,argp) { \
DWORD thid; \
*(thp) = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) func, (LPVOID) argp, 0, &thid); \
@@ -790,6 +800,7 @@
exit(1); \
} \
}
+#endif
#define cdft_thread_wait(th) { \
WaitForSingleObject(th, INFINITE); \
CloseHandle(th); \