Skip to content

Commit

Permalink
Support libntech's new efficient file/data copying
Browse files Browse the repository at this point in the history
We need to take care of the newly required checks in configure.ac
because we are responsible for producing config.h usable for both
us and libntech.

Ticket: CFE-4380
Changelog: File copying now uses more efficient implementation on
           Linux platforms
  • Loading branch information
vpodzime committed May 20, 2024
1 parent 28be128 commit 894fc4f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,25 @@ AC_CHECK_HEADERS(utmp.h)
dnl POSIX way to get uptime
AC_CHECK_HEADERS(utmpx.h)


dnl ######################################################################
dnl Fancy new Linux syscalls for file/data copying (config for libntech)
dnl ######################################################################
AC_CHECK_HEADERS([linux/fs.h])
AC_CHECK_DECLS([FICLONE], [], [], [#include <linux/fs.h>])
AC_CHECK_DECLS([SEEK_DATA], [], [], [
#define _GNU_SOURCE
#include <unistd.h>
])
AC_CHECK_DECLS([FALLOC_FL_PUNCH_HOLE], [], [], [
#define _GNU_SOURCE
#include <fcntl.h>
])
AC_CHECK_HEADERS([sys/sendfile.h])
AC_CHECK_FUNCS([sendfile])
AC_CHECK_FUNCS([copy_file_range])


dnl #######################################################################
dnl Newer BSD systems don't have a compatible rtentry - use ortentry
dnl #######################################################################
Expand Down
2 changes: 1 addition & 1 deletion libntech
Submodule libntech updated 2 files
+18 −0 configure.ac
+235 −14 libutils/file_lib.c

0 comments on commit 894fc4f

Please sign in to comment.