Skip to content

Commit

Permalink
fix ucontext configure check
Browse files Browse the repository at this point in the history
musl ships the header for other purposes, but makecontext is not
implemented. fix the check to detect if makecontext is implemented
before enabling code using it.
  • Loading branch information
fabled authored and Sergey Vojtovich committed Mar 14, 2018
1 parent 38579ce commit 782fb1e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,9 @@ CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
IF(NOT HAVE_UCONTEXT_H)
CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H)
ENDIF()
IF(HAVE_UCONTEXT_H)
CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H)
ENDIF()

CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_sec "time.h" STRUCT_TIMESPEC_HAS_TV_SEC)
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_nsec "time.h" STRUCT_TIMESPEC_HAS_TV_NSEC)
Expand Down

0 comments on commit 782fb1e

Please sign in to comment.