diff options
author | Jeremy Allison <jra@samba.org> | 2008-05-06 15:44:39 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-05-06 15:44:39 -0700 |
commit | 82572cfd4370fbcfbe35f1d5f11fb05fc732cba2 (patch) | |
tree | ae63910030dbea4c1f0f5c6ea11cbc6d146fd8ae /source3/configure.in | |
parent | 5621ce6fb45a85e5f381286ef307e02ed8178c7f (diff) | |
download | samba-82572cfd4370fbcfbe35f1d5f11fb05fc732cba2.tar.gz samba-82572cfd4370fbcfbe35f1d5f11fb05fc732cba2.tar.xz samba-82572cfd4370fbcfbe35f1d5f11fb05fc732cba2.zip |
Enable tests for splice on Linux. Add a static (vl, I hate this)
so we can detect broken Linux recvfile splice and correctly fall
back.
Jeremy.
(This used to be commit ec2d301a7aac173aba41dd2074037f27d05095ce)
Diffstat (limited to 'source3/configure.in')
-rw-r--r-- | source3/configure.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in index a07b5b4aacd..bbce8b65e87 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -5664,6 +5664,26 @@ if test x"$samba_cv_HAVE_POSIX_FADVISE" = x"yes"; then [Whether posix_fadvise is available]) fi +############################################ +# See if we have the Linux splice syscall. + +AC_CACHE_CHECK([for Linux splice], + samba_cv_HAVE_LINUX_SPLICE,[ + AC_TRY_LINK([ +#if defined(HAVE_UNISTD_H) +#include <unistd.h> +#endif +#include <fcntl.h>], + [long ret = splice(0,0,1,0,400,0);], + samba_cv_HAVE_LINUX_SPLICE=yes, + samba_cv_HAVE_LINUX_SPLICE=no)]) + +if test x"$samba_cv_HAVE_LINUX_SPLICE" = x"yes"; then + AC_DEFINE(HAVE_LINUX_SPLICE,1, + [Whether Linux splice is available]) +fi + +AC_HAVE_DECL(splice, [#include <fcntl.h>]) ################################################# |