diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-23 14:12:07 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-11-23 14:41:42 +0000 |
commit | a28895f56f2ab9233f7ad1b345e07c6249bef1f3 (patch) | |
tree | 84d5692bfd48a1c91da1bb1113078093be582b3f /community/open-vm-tools/0011-use-off64_t-instead-of-loff_t.patch | |
parent | 00fc18aa0c07998215c7fc55185c63ae496592eb (diff) | |
download | aports-a28895f56f2ab9233f7ad1b345e07c6249bef1f3.tar.bz2 aports-a28895f56f2ab9233f7ad1b345e07c6249bef1f3.tar.xz |
community/open-vm-tools: move from main
Diffstat (limited to 'community/open-vm-tools/0011-use-off64_t-instead-of-loff_t.patch')
-rw-r--r-- | community/open-vm-tools/0011-use-off64_t-instead-of-loff_t.patch | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/community/open-vm-tools/0011-use-off64_t-instead-of-loff_t.patch b/community/open-vm-tools/0011-use-off64_t-instead-of-loff_t.patch new file mode 100644 index 0000000000..fd2653e800 --- /dev/null +++ b/community/open-vm-tools/0011-use-off64_t-instead-of-loff_t.patch @@ -0,0 +1,110 @@ +From 099ef837922ee97c64651bc49c26022b7a97f816 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Mon, 2 Jan 2017 15:25:32 +0000 +Subject: [PATCH 11/12] use off64_t instead of loff_t + +--- + open-vm-tools/vmhgfs-fuse/file.c | 12 ++++++------ + open-vm-tools/vmhgfs-fuse/fsutil.c | 2 +- + open-vm-tools/vmhgfs-fuse/fsutil.h | 8 ++------ + 3 files changed, 9 insertions(+), 13 deletions(-) + +diff --git a/open-vm-tools/vmhgfs-fuse/file.c b/open-vm-tools/vmhgfs-fuse/file.c +index 389ebba8..d22b66df 100644 +--- a/open-vm-tools/vmhgfs-fuse/file.c ++++ b/open-vm-tools/vmhgfs-fuse/file.c +@@ -535,7 +535,7 @@ static int + HgfsDoRead(HgfsHandle handle, // IN: Handle for this file + char *buf, // OUT: Buffer to copy data into + size_t count, // IN: Number of bytes to read +- loff_t offset) // IN: Offset at which to read ++ off64_t offset) // IN: Offset at which to read + { + HgfsReq *req; + HgfsOp opUsed; +@@ -668,11 +668,11 @@ ssize_t + HgfsRead(struct fuse_file_info *fi, // IN: File info struct + char *buf, // OUT: User buffer to copy data into + size_t count, // IN: Number of bytes to read +- loff_t offset) // IN: Offset at which to read ++ off64_t offset) // IN: Offset at which to read + { + int result = 0; + char *buffer = buf; +- loff_t curOffset = offset; ++ off64_t curOffset = offset; + size_t nextCount, remainingCount = count; + + ASSERT(NULL != fi); +@@ -729,7 +729,7 @@ static int + HgfsDoWrite(HgfsHandle handle, // IN: Handle for the file + const char *buf, // IN: Buffer containing data + size_t count, // IN: Number of bytes to write +- loff_t offset) // IN: Offset to begin writing at ++ off64_t offset) // IN: Offset to begin writing at + { + HgfsReq *req; + int result = 0; +@@ -853,11 +853,11 @@ ssize_t + HgfsWrite(struct fuse_file_info *fi, // IN: File info structure + const char *buf, // OUT: User buffer to copy data into + size_t count, // IN: Number of bytes to read +- loff_t offset) // IN: Offset at which to read ++ off64_t offset) // IN: Offset at which to read + { + int result; + const char *buffer = buf; +- loff_t curOffset = offset; ++ off64_t curOffset = offset; + size_t nextCount, remainingCount = count; + ssize_t bytesWritten = 0; + +diff --git a/open-vm-tools/vmhgfs-fuse/fsutil.c b/open-vm-tools/vmhgfs-fuse/fsutil.c +index 042c223c..c3d581d3 100644 +--- a/open-vm-tools/vmhgfs-fuse/fsutil.c ++++ b/open-vm-tools/vmhgfs-fuse/fsutil.c +@@ -680,7 +680,7 @@ HgfsStatusConvertToLinux(HgfsStatus hgfsStatus) // IN: Status code to convert + unsigned long + HgfsCalcBlockSize(uint64 tsize) + { +- loff_t used = (tsize + 511) >> 9; ++ off64_t used = (tsize + 511) >> 9; + return (used > ULONG_MAX) ? ULONG_MAX : used; + } + +diff --git a/open-vm-tools/vmhgfs-fuse/fsutil.h b/open-vm-tools/vmhgfs-fuse/fsutil.h +index 34b6d489..a75cff82 100644 +--- a/open-vm-tools/vmhgfs-fuse/fsutil.h ++++ b/open-vm-tools/vmhgfs-fuse/fsutil.h +@@ -32,10 +32,6 @@ + #include "hgfsProto.h" + #include <fuse.h> + +-#if defined(__FreeBSD__) || defined(__SOLARIS__) || defined(__APPLE__) +-typedef long long loff_t; +-#endif +- + /* + * Struct used to pass around attributes. + * These aren't just the attributes seen in HgfsAttr[V2]; we add a filename +@@ -73,7 +69,7 @@ ssize_t + HgfsWrite(struct fuse_file_info *fi, + const char *buf, + size_t count, +- loff_t offset); ++ off64_t offset); + + int + HgfsRename(const char* from, const char* to); +@@ -93,7 +89,7 @@ ssize_t + HgfsRead(struct fuse_file_info *fi, + char *buf, + size_t count, +- loff_t offset); ++ off64_t offset); + + int + HgfsSetattr(const char* path, +-- +2.19.1 + |