Bugfixes which were found when trying to compile on windows

This commit is contained in:
Anne de Jong 2020-04-13 15:21:15 +02:00
parent 92034d3d2f
commit 7cc77b073a
3 changed files with 14 additions and 4 deletions

View File

@ -15,4 +15,7 @@ add_subdirectory(device)
set_source_files_properties(wrappers.c PROPERTIES COMPILE_FLAGS "${CMAKE_C_FLAGS} ${CYTHON_EXTRA_C_FLAGS}")
cython_add_module(wrappers wrappers.pyx)
target_link_libraries(wrappers lasp_lib python37)
target_link_libraries(wrappers lasp_lib)
if(win32)
target_link_libraries(wrappers python37)
endif(win32)

View File

@ -26,7 +26,7 @@ typedef struct Workers_s {
us num_workers;
} Workers;
static void threadfcn(void* data);
static void* threadfcn(void* data);
Workers* Workers_create(const us num_workers,
JobQueue* jq,
@ -123,7 +123,7 @@ void Workers_free(Workers* w) {
}
static void threadfcn(void* thread_global_data) {
static void* threadfcn(void* thread_global_data) {
TRACE(15,"Started worker thread function");
dbgassert(thread_global_data,NULLPTRDEREF "thread_data in"
@ -186,6 +186,10 @@ static void threadfcn(void* thread_global_data) {
wfree(w_data);
TRACE(15,"Exiting thread. Goodbye");
pthread_exit((void*) NULL);
/* This return statement is never reached, but added to have a proper return
* type from this function. */
return NULL;
}

View File

@ -5,4 +5,7 @@ set_source_files_properties(lasp_rtaudio.cxx PROPERTIES COMPILE_FLAGS
cython_add_module(lasp_rtaudio lasp_rtaudio.pyx)
target_link_libraries(lasp_rtaudio pthread rtaudio python37)
target_link_libraries(lasp_rtaudio pthread rtaudio)
if(win32)
target_link_libraries(lasp_rtaudio python37)
endif(win32)