Skip to content

Commit

Permalink
Merge pull request #29 from jd-boyd/osx_cmake_itimerspec
Browse files Browse the repository at this point in the history
Detect missing itimerspec on OSX.
  • Loading branch information
brarcher committed Mar 24, 2016
2 parents b6c4108 + c82fe88 commit f4151a3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ if(NOT HAVE_SYS_TIME_H)
endif(MSVC)
endif(NOT HAVE_SYS_TIME_H)

# OSX has sys/time.h, but it still lacks itimerspec
if(HAVE_SYS_TIME_H)
check_struct_member("struct itimerspec" it_value "sys/time.h" HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
if(NOT HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
add_definitions(-DSTRUCT_ITIMERSPEC_DEFINITION_MISSING=1)
set(STRUCT_ITIMERSPEC_DEFINITION_MISSING 1)
endif(NOT HAVE_STRUCT_ITIMERSPEC_IT_VALUE)
endif(HAVE_SYS_TIME_H)

###############################################################################
# Check for integer types
Expand Down

0 comments on commit f4151a3

Please sign in to comment.