File: hurd_disable_unimplemented.diff

package info (click to toggle)
kio 5.116.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 41,496 kB
  • sloc: cpp: 123,468; xml: 528; ansic: 466; ruby: 60; sh: 21; makefile: 10
file content (29 lines) | stat: -rw-r--r-- 1,359 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Author: Pino Toscano <pino@debian.org>
Description: On Hurd, do not look for functions unimplemented in libc
 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.
Last-Update: 2022-02-22
Forwarded: not-needed

--- a/src/ioslaves/file/ConfigureChecks.cmake
+++ b/src/ioslaves/file/ConfigureChecks.cmake
@@ -13,9 +13,13 @@ check_include_files(sys/xattr.h   HAVE_S
 # 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)