]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build: (copyfilerange) include syscall header check for fallback
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Wed, 15 Apr 2026 12:17:40 +0000 (08:17 -0400)
committerChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Wed, 15 Apr 2026 12:18:32 +0000 (08:18 -0400)
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
meson.build

index 40cee627d3947995bb37c402f3866c809f5362a4..88010cac0e952156d99270db1e7aab6e963c4638 100644 (file)
@@ -3105,7 +3105,9 @@ if opt and not is_disabler(exe)
   exes += exe
 endif
 
-opt = get_option('build-copyfilerange').require(LINUX and conf.get('HAVE_COPY_FILE_RANGE').to_string() == '1').allowed()
+have_copy_file_range = conf.get('HAVE_COPY_FILE_RANGE').to_string() == '1' \
+  or cc.has_header_symbol('sys/syscall.h', 'SYS_copy_file_range')
+opt = get_option('build-copyfilerange').require(LINUX and have_copy_file_range).allowed()
 exe = executable(
   'copyfilerange',
   copyfilerange_sources,