From: Michael Jeanson Date: Tue, 13 Oct 2020 21:32:14 +0000 (-0400) Subject: port: posix_fadvise is available in FreeBSD >= 10.0 X-Git-Tag: v2.13.0-rc1~453 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=3306f57f46985487bce75e5e5200ee6d0620ffd2 port: posix_fadvise is available in FreeBSD >= 10.0 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau Change-Id: I85f823ad7be94a5860ce0104c20e5a49ce030eda --- 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__ */