winpr: fixed build warnings

* moved pthread_tryjoin_np to toplevel CMakeLists.txt
* removed duplicated -DHAVE_PTHREAD_GNU_EXT
This commit is contained in:
Bernhard Miklautz 2013-11-15 16:04:04 +01:00
parent 9fcf5eadf0
commit 916f2d2dbf
2 changed files with 6 additions and 6 deletions

View File

@ -312,6 +312,11 @@ if(NOT IOS AND NOT ANDROID)
find_package(Threads REQUIRED)
endif()
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
check_library_exists(pthread pthread_tryjoin_np "" HAVE_PTHREAD_GNU_EXT)
list(REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
if(UNIX OR CYGWIN)
check_include_files(sys/eventfd.h HAVE_AIO_H)
check_include_files(sys/eventfd.h HAVE_EVENTFD_H)

View File

@ -18,13 +18,8 @@
set(MODULE_NAME "winpr-synch")
set(MODULE_PREFIX "WINPR_SYNCH")
INCLUDE (CheckLibraryExists)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
check_library_exists(pthread pthread_tryjoin_np "" HAVE_PTHREAD_GNU_EXT)
list(REMOVE_ITEM CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
if(HAVE_PTHREAD_GNU_EXT)
add_definitions(-D_GNU_SOURCE -DHAVE_PTHREAD_GNU_EXT)
add_definitions(-D_GNU_SOURCE)
endif(HAVE_PTHREAD_GNU_EXT)
include_directories(../thread)