From e8a48c26f9a12b00c8237790b6c9b0fb9214dedd Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 23 May 2024 23:34:42 +0200 Subject: [PATCH] On Hurd, do not look for functions unimplemented in libc Last-Update: 2022-02-22 Forwarded: not-needed The check_function_exists() function of cmake does not keep into account the defines that glibc provides for the stubs (i.e. unimplemented functions that always return ENOSYS), so some functions are detected as available. Unfortunately, due to --fatal-warnings for the linker, linking will fail. Hence, do not attempt to look for functions that are currently unimplemented on GNU/Hurd's libc. Gbp-Pq: Name hurd_disable_unimplemented.diff --- src/ioslaves/file/ConfigureChecks.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ioslaves/file/ConfigureChecks.cmake b/src/ioslaves/file/ConfigureChecks.cmake index db212fc..88dc8a7 100644 --- a/src/ioslaves/file/ConfigureChecks.cmake +++ b/src/ioslaves/file/ConfigureChecks.cmake @@ -13,9 +13,13 @@ check_include_files(sys/xattr.h HAVE_SYS_XATTR_H) # On FreeBSD extattr.h doesn't compile without manually including sys/types.h check_include_files("sys/types.h;sys/extattr.h" HAVE_SYS_EXTATTR_H) -check_function_exists(copy_file_range HAVE_COPY_FILE_RANGE) +if (NOT (CMAKE_SYSTEM_NAME STREQUAL "GNU")) + check_function_exists(copy_file_range HAVE_COPY_FILE_RANGE) +endif() -check_function_exists(posix_fadvise HAVE_FADVISE) # KIO worker +if (NOT (CMAKE_SYSTEM_NAME STREQUAL "GNU")) + check_function_exists(posix_fadvise HAVE_FADVISE) # KIO worker +endif() check_struct_has_member("struct dirent" d_type dirent.h HAVE_DIRENT_D_TYPE LANGUAGE CXX) -- 2.30.2