aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb/fix-ucontext-check.patch
blob: 7763ad66816897e821596b0321b024f092df6aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/configure.cmake
+++ b/configure.cmake
@@ -1018,9 +1018,12 @@
 
 SET(CMAKE_EXTRA_INCLUDE_FILES) 
 
-CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
-IF(NOT HAVE_UCONTEXT_H)
-  CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_H)
+CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_HEADER)
+IF(NOT HAVE_UCONTEXT_HEADER)
+  CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_UCONTEXT_HEADER)
+ENDIF()
+IF(HAVE_UCONTEXT_HEADER)
+  CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H)
 ENDIF()
 IF(HAVE_UCONTEXT_H)
   CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H)