From 3306f57f46985487bce75e5e5200ee6d0620ffd2 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 13 Oct 2020 17:32:14 -0400 Subject: [PATCH] port: posix_fadvise is available in FreeBSD >= 10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau Change-Id: I85f823ad7be94a5860ce0104c20e5a49ce030eda --- src/common/compat/fcntl.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/common/compat/fcntl.h b/src/common/compat/fcntl.h index bbbf47ba5..ef97bf9da 100644 --- a/src/common/compat/fcntl.h +++ b/src/common/compat/fcntl.h @@ -12,7 +12,7 @@ #include #include -#if (defined(__FreeBSD__) || defined(__CYGWIN__)) +#if (defined(__CYGWIN__)) typedef long long off64_t; #endif @@ -59,15 +59,6 @@ static inline ssize_t splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_ } #endif -#ifdef __FreeBSD__ -#define POSIX_FADV_DONTNEED 0 - -static inline int posix_fadvise(int fd, off_t offset, off_t len, int advice) -{ - return -ENOSYS; -} -#endif - #if !(defined(__linux__) || defined(__FreeBSD__) || defined(__CYGWIN__) || defined(__sun__) || defined(__APPLE__)) #error "Please add support for your OS." #endif /* __linux__ , __FreeBSD__, __CYGWIN__, __sun__, __APPLE__ */ -- 2.34.1