diff options
author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-03-21 20:47:07 +0000 |
---|---|---|
committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2019-03-21 20:47:07 +0000 |
commit | bd7c9fae3d36dde3f0215440b90137f2014eeb33 (patch) | |
tree | ee3b61311a768fbba9cb4dacc6a2ab5168209984 /src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp | |
parent | 0d748bac5ee6c7fc171eea3fa287ec085aaf3026 (diff) | |
download | VirtualBox-svn-bd7c9fae3d36dde3f0215440b90137f2014eeb33.tar.gz |
IPRT: Spealiced RTFileCopyPartEx and associated prep/cleanup functions for linux copy_file_range(). [build fix] bugref:9172
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@77834 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp')
-rw-r--r-- | src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp b/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp index 656eee69539..3891a01227d 100644 --- a/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp +++ b/src/VBox/Runtime/r3/linux/RTFileCopyPartEx-linux.cpp @@ -40,13 +40,19 @@ #include <sys/syscall.h> #ifndef __NR_copy_file_range -# define __NR_copy_file_range 285 +# if defined(RT_ARCH_X86) || defined(RT_ARCH_AMD64) +# define __NR_copy_file_range 285 +# endif #endif + +#ifndef __NR_copy_file_range +# include "../../generic/RTFileCopyPartEx-generic.cpp" +#else /* __NR_copy_file_range - whole file */ /* Include the generic code as a fallback since copy_file_range is rather new . */ -#define IPRT_FALLBACK_VERSION -#include "../../generic/RTFileCopyPartEx-generic.cpp" -#undef IPRT_FALLBACK_VERSION +# define IPRT_FALLBACK_VERSION +# include "../../generic/RTFileCopyPartEx-generic.cpp" +# undef IPRT_FALLBACK_VERSION /********************************************************************************************************************************* @@ -166,6 +172,6 @@ RTDECL(int) RTFileCopyPartEx(RTFILE hFileSrc, RTFOFF offSrc, RTFILE hFileDst, RT return rc; } -RT_EXPORT_SYMBOL(RTFileCopyPartEx); +#endif /* __NR_copy_file_range */ |