diff options
author | Ryo Nakamura <upa@haeena.net> | 2023-09-08 17:19:13 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2023-09-08 17:19:13 +0900 |
commit | 72841ec12d5865b4f020dc23c64553deb2fe15d6 (patch) | |
tree | 96f746e3e75c50383e75c76e3365a732770e707b | |
parent | 19704a73088df154539735b3c3d298c8e6ad48eb (diff) |
fix: use off_t for lseek
-rw-r--r-- | src/fileops.c | 4 | ||||
-rw-r--r-- | src/fileops.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/fileops.c b/src/fileops.c index 39d0801..78cc937 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -278,9 +278,9 @@ void mscp_close(mf *f) free(f); } -int mscp_lseek(mf *f, size_t off) +off_t mscp_lseek(mf *f, off_t off) { - int ret; + off_t ret; if (f->remote) { ret = sftp_seek64(f->remote, off); diff --git a/src/fileops.h b/src/fileops.h index 8dc6e5b..cd35992 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -45,7 +45,7 @@ typedef struct mf_struct mf; mf *mscp_open(const char *path, int flags, mode_t mode, sftp_session sftp); void mscp_close(mf *f); -int mscp_lseek(mf *f, size_t off); +off_t mscp_lseek(mf *f, off_t off); /* mscp_setstat() involves chmod and truncate. It executes both at * once via a single SFTP command (sftp_setstat()). |