X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fcompat%2Ffcntl.hpp;fp=src%2Fcommon%2Fcompat%2Ffcntl.hpp;h=08fe02cf4c44bb97eaa5e3801d847e0284e5d6ad;hb=57fd993799a2b081c826f6fc8def32d28d526bfb;hp=a526ca55d4326791e6a2177bcff51e76baf223c0;hpb=7e090e6bea2c8ea8ef7b776caf17b529b1e1f7ce;p=lttng-tools.git diff --git a/src/common/compat/fcntl.hpp b/src/common/compat/fcntl.hpp index a526ca55d..08fe02cf4 100644 --- a/src/common/compat/fcntl.hpp +++ b/src/common/compat/fcntl.hpp @@ -13,16 +13,15 @@ #include -#if (defined(__CYGWIN__)) -typedef long long off64_t; -#endif +static_assert(sizeof(off_t) == sizeof(int64_t), + "Build system is misconfigured, off_t must be 64-bit wide"); #if (defined(__FreeBSD__) || defined(__sun__)) typedef off64_t loff_t; #endif #ifdef __linux__ -extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes, +extern int compat_sync_file_range(int fd, off_t offset, off_t nbytes, unsigned int flags); #define lttng_sync_file_range(fd, offset, nbytes, flags) \ compat_sync_file_range(fd, offset, nbytes, flags) @@ -39,8 +38,8 @@ extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes, static inline int lttng_sync_file_range( int fd __attribute__((unused)), - off64_t offset __attribute__((unused)), - off64_t nbytes __attribute__((unused)), + off_t offset __attribute__((unused)), + off_t nbytes __attribute__((unused)), unsigned int flags __attribute__((unused))) { return -ENOSYS;