From c73b7f817afa6ee133112a4fb3ffd5c603a87eb9 Mon Sep 17 00:00:00 2001 From: benrubson Date: Fri, 10 Mar 2017 14:51:31 +0100 Subject: [PATCH] check that llistxattr exists, choose the correct function --- CMakeLists.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c315b5..fa679f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -98,14 +98,17 @@ set (CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) include (CheckCXXSourceCompiles) set(CMAKE_REQUIRED_QUIET_SAVE ${CMAKE_REQUIRED_QUIET}) set (CMAKE_REQUIRED_QUIET True) -check_cxx_source_compiles ("#include - #include - int main() { llistxattr(0,0,0); return 1; } - " XATTR_LLIST) +if (XATTR_ADD_OPT) check_cxx_source_compiles ("#include #include int main() { llistxattr(0,0,0,0); return 1; } " XATTR_LLIST) +else (XATTR_ADD_OPT) +check_cxx_source_compiles ("#include + #include + int main() { llistxattr(0,0,0); return 1; } + " XATTR_LLIST) +endif (XATTR_ADD_OPT) set (CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) # Check if we have some standard functions.