From: brarcher Date: Wed, 25 Dec 2013 03:04:36 +0000 (+0000) Subject: cmake: add check for struct timespec for windows X-Git-Tag: 0.10.0~264 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b141968f4c33c9090ddc48338674f367f0cc7d8;p=check cmake: add check for struct timespec for windows git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@952 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/CMakeLists.txt b/CMakeLists.txt index fca722f..8d12291 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -225,6 +225,12 @@ if(NOT HAVE_SYS_TIME_H) if(MSVC) check_struct_member("struct timeval" tv_sec "Winsock2.h" HAVE_STRUCT_TIMEVAL_TV_SEC) check_struct_member("struct timeval" tv_usec "Winsock2.h" HAVE_STRUCT_TIMEVAL_TV_USEC) + check_struct_member("struct timespec" tv_usec "Winsock2.h" HAVE_STRUCT_TIMESPEC_TV_SEC) + + if(NOT HAVE_STRUCT_TIMESPEC_TV_SEC) + add_definitions(-DSTRUCT_TIMESPEC_DEFINITION_MISSING=1) + set(STRUCT_TIMESPEC_DEFINITION_MISSING 1) + endif(NOT HAVE_STRUCT_TIMESPEC_TV_SEC) endif(MSVC) endif(NOT HAVE_SYS_TIME_H)