Merge pull request #10 from librtlsdr/PThreadsFix

Bug Fix for some Broken MinGW PThreads sources
master
Lucas Teske 2016-07-22 02:05:20 -03:00 committed by GitHub
commit bf3319ddea
5 changed files with 22 additions and 1 deletions

View File

@ -57,6 +57,14 @@ if(CMAKE_COMPILER_IS_GNUCC AND NOT WIN32)
add_definitions(-fvisibility=hidden)
endif()
#########################################################################
# Bug Fix
#########################################################################
OPTION(NEED_PTHREADS_WORKARROUND "PThreads Workarround for timespec")
IF (DEFINED NEED_PTHREADS_WORKARROUND)
ADD_DEFINITIONS(-DNEED_PTHREADS_WORKARROUND)
ENDIF()
########################################################################
# Find build dependencies
########################################################################

View File

@ -36,7 +36,10 @@
#include <io.h>
#include "getopt/getopt.h"
#endif
#ifdef NEED_PTHREADS_WORKARROUND
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>
#include <libusb.h>

View File

@ -69,6 +69,10 @@
#define _USE_MATH_DEFINES
#endif
#ifdef NEED_PTHREADS_WORKARROUND
#define HAVE_STRUCT_TIMESPEC
#endif
#include <math.h>
#include <pthread.h>
#include <libusb.h>

View File

@ -60,6 +60,9 @@
#endif
#include <math.h>
#ifdef NEED_PTHREADS_WORKARROUND
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>
#include <libusb.h>

View File

@ -37,6 +37,9 @@
#include "getopt/getopt.h"
#endif
#ifdef NEED_PTHREADS_WORKARROUND
#define HAVE_STRUCT_TIMESPEC
#endif
#include <pthread.h>
#include "rtl-sdr.h"