summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2023-01-14 21:31:56 +0000
committerNikolaus Rath <Nikolaus@rath.org>2023-01-15 10:09:10 +0000
commit19d95c0e701076407dc1f3cfd39e12e28b332927 (patch)
tree704f7be40dcd80f9e229e111767b571265e4329d
parent9acd183460656bffa6672e85a413b5b4f80bce5e (diff)
downloadfuse-19d95c0e701076407dc1f3cfd39e12e28b332927.tar.gz
use off_t over __off64_t
when -D_FILE_OFFSET_BITS=64 is defined, the off_t type is 64 bits wide already. the fuse_common.h header already checks for this, and errors when it is not, so be consistent with all the other uses of off_t. some libcs like musl do not have a 32-bit off_t type, and don't define __off64_t.
-rw-r--r--example/hello_ll_uds.c4
-rw-r--r--include/fuse_lowlevel.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/example/hello_ll_uds.c b/example/hello_ll_uds.c
index c1f64d7..f291fed 100644
--- a/example/hello_ll_uds.c
+++ b/example/hello_ll_uds.c
@@ -277,8 +277,8 @@ static ssize_t stream_read(int fd, void *buf, size_t buf_len, void *userdata) {
return (res == -1) ? res : (res + prev_res);
}
-static ssize_t stream_splice_send(int fdin, __off64_t *offin, int fdout,
- __off64_t *offout, size_t len,
+static ssize_t stream_splice_send(int fdin, off_t *offin, int fdout,
+ off_t *offout, size_t len,
unsigned int flags, void *userdata) {
(void)userdata;
diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h
index ff0d966..96088d7 100644
--- a/include/fuse_lowlevel.h
+++ b/include/fuse_lowlevel.h
@@ -130,11 +130,11 @@ struct fuse_forget_data {
struct fuse_custom_io {
ssize_t (*writev)(int fd, struct iovec *iov, int count, void *userdata);
ssize_t (*read)(int fd, void *buf, size_t buf_len, void *userdata);
- ssize_t (*splice_receive)(int fdin, __off64_t *offin, int fdout,
- __off64_t *offout, size_t len,
+ ssize_t (*splice_receive)(int fdin, off_t *offin, int fdout,
+ off_t *offout, size_t len,
unsigned int flags, void *userdata);
- ssize_t (*splice_send)(int fdin, __off64_t *offin, int fdout,
- __off64_t *offout, size_t len,
+ ssize_t (*splice_send)(int fdin, off_t *offin, int fdout,
+ off_t *offout, size_t len,
unsigned int flags, void *userdata);
};