X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Ffcntl.h;h=9fca7f0cdc4699e8ed6155a08b6e7630d1417dfa;hb=4878de5c7deb512bbdac4fdfc498907efa06fb7c;hp=bbbf47ba593aaba2e4f6c1b7ee4ba07707d21fce;hpb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;p=lttng-tools.git diff --git a/src/common/compat/fcntl.h b/src/common/compat/fcntl.h index bbbf47ba5..9fca7f0cd 100644 --- a/src/common/compat/fcntl.h +++ b/src/common/compat/fcntl.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2011 David Goulet * - * SPDX-License-Identifier: GPL-2.0-only + * SPDX-License-Identifier: LGPL-2.1-only * */ @@ -9,10 +9,11 @@ #define _COMPAT_FCNTL_H #include -#include #include -#if (defined(__FreeBSD__) || defined(__CYGWIN__)) +#include + +#if (defined(__CYGWIN__)) typedef long long off64_t; #endif @@ -36,8 +37,11 @@ extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes, #define SYNC_FILE_RANGE_WAIT_BEFORE 0 #define SYNC_FILE_RANGE_WRITE 0 -static inline int lttng_sync_file_range(int fd, off64_t offset, - off64_t nbytes, unsigned int flags) +static inline int lttng_sync_file_range( + int fd __attribute__((unused)), + off64_t offset __attribute__((unused)), + off64_t nbytes __attribute__((unused)), + unsigned int flags __attribute__((unused))) { return -ENOSYS; } @@ -52,17 +56,13 @@ static inline int lttng_sync_file_range(int fd, off64_t offset, #define SPLICE_F_MORE 0 #define SPLICE_F_GIFT 0 -static inline ssize_t splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, - size_t len, unsigned int flags) -{ - return -ENOSYS; -} -#endif - -#ifdef __FreeBSD__ -#define POSIX_FADV_DONTNEED 0 - -static inline int posix_fadvise(int fd, off_t offset, off_t len, int advice) +static inline ssize_t splice( + int fd_in __attribute__((unused)), + loff_t *off_in __attribute__((unused)), + int fd_out __attribute__((unused)), + loff_t *off_out __attribute__((unused)), + size_t len __attribute__((unused)), + unsigned int flags __attribute__((unused))) { return -ENOSYS; }