diff options
author | Bernd Kuhls <bernd.kuhls@t-online.de> | 2018-10-07 14:25:59 +0200 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-10-17 00:10:18 +0400 |
commit | 2a576f71c5d3c7aacef564e5b1251f83bde48f51 (patch) | |
tree | e5ad88efaa1cc5f8df0b3f1929b44273334725ff /configure.cmake | |
parent | d8974ebd677f97cf80bf0cd1446e60631895a5d7 (diff) | |
download | mariadb-git-2a576f71c5d3c7aacef564e5b1251f83bde48f51.tar.gz |
cmake: fix ucontext detection
On some archs uclibc does not provide the ucontext structure despite
providing ucontext.h, for details see
https://git.buildroot.net/buildroot/commit/?id=f1cbfeea95e6287c7a666aafc182ffa318eff262
This patch improves the detection of ucontext by making sure that
HAVE_UCONTEXT_H is only set when makecontext() was found.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/configure.cmake b/configure.cmake index df180e72963..d37dccbea4a 100644 --- a/configure.cmake +++ b/configure.cmake @@ -1107,11 +1107,11 @@ SET(CMAKE_EXTRA_INCLUDE_FILES) CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_INO) CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN) SET(SPRINTF_RETURNS_INT 1) -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_FILE_UCONTEXT_H) +IF(NOT HAVE_FILE_UCONTEXT_H) + CHECK_INCLUDE_FILE(sys/ucontext.h HAVE_FILE_UCONTEXT_H) ENDIF() -IF(HAVE_UCONTEXT_H) +IF(HAVE_FILE_UCONTEXT_H) CHECK_FUNCTION_EXISTS(makecontext HAVE_UCONTEXT_H) ENDIF() |