summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/configure.in2
-rw-r--r--source3/include/includes.h3
-rw-r--r--source3/lib/replace/README5
-rw-r--r--source3/lib/replace/libreplace.m41
-rw-r--r--source3/lib/replace/replace.h4
5 files changed, 5 insertions, 10 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 63e343f43f..1c32bf6d58 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -5925,6 +5925,8 @@ if test x"$samba_cv_HAVE_LINUX_READAHEAD" = x"yes"; then
[Whether Linux readahead is available])
fi
+AC_HAVE_DECL(readahead, [#include <fcntl.h>])
+
############################################
# See if we have the posix_fadvise syscall.
diff --git a/source3/include/includes.h b/source3/include/includes.h
index d1cd27585e..0e90004bdb 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -1214,6 +1214,9 @@ LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
#endif /* HAVE_LDAP */
+#if defined(HAVE_LINUX_READAHEAD) && ! defined(HAVE_READAHEAD_DECL)
+ssize_t readahead(int fd, off64_t offset, size_t count);
+#endif
/* TRUE and FALSE are part of the C99 standard and gcc, but
unfortunately many vendor compilers don't support them. Use True
diff --git a/source3/lib/replace/README b/source3/lib/replace/README
index a2f9e2fa29..77558b2ca9 100644
--- a/source3/lib/replace/README
+++ b/source3/lib/replace/README
@@ -55,11 +55,6 @@ strtoull
socketpair
strptime
-These external declarations are provided for those systems which lack the
-declaration but provide the function:
-
-readahead
-
Types:
bool
socklen_t
diff --git a/source3/lib/replace/libreplace.m4 b/source3/lib/replace/libreplace.m4
index a030ce2e90..e9b19b7cf5 100644
--- a/source3/lib/replace/libreplace.m4
+++ b/source3/lib/replace/libreplace.m4
@@ -155,7 +155,6 @@ AC_CHECK_FUNCS(pread pwrite strndup strcasestr strtok_r mkdtemp socketpair)
AC_HAVE_DECL(setresuid, [#include <unistd.h>])
AC_HAVE_DECL(setresgid, [#include <unistd.h>])
AC_HAVE_DECL(errno, [#include <errno.h>])
-AC_HAVE_DECL(readahead, [#include <fcntl.h>])
AC_CACHE_CHECK([for secure mkstemp],samba_cv_HAVE_SECURE_MKSTEMP,[
AC_TRY_RUN([#include <stdlib.h>
diff --git a/source3/lib/replace/replace.h b/source3/lib/replace/replace.h
index 2bda0eab52..3cb3c95b69 100644
--- a/source3/lib/replace/replace.h
+++ b/source3/lib/replace/replace.h
@@ -111,10 +111,6 @@ extern char *sys_errlist[];
extern int errno;
#endif
-#if defined(HAVE_LINUX_READAHEAD) && ! defined(HAVE_READAHEAD_DECL)
-ssize_t readahead(int fd, off64_t offset, size_t count);
-#endif
-
#ifndef HAVE_STRDUP
#define strdup rep_strdup
char *rep_strdup(const char *s);