summaryrefslogtreecommitdiff
path: root/include/utils
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2015-09-28 16:43:43 +0100
committerSami Tolvanen <samitolvanen@google.com>2015-09-28 16:52:38 +0100
commit8731d30085b02012487552d8ad6d95c0ac9a8d4d (patch)
tree63c2290fac95ab61766a60d9406de465dee730b7 /include/utils
parentfca4821e05f1d4684185b559d177ffde6937bf61 (diff)
utils: add pwrite64 to Compat.h for Mac
Compat.h has lseek64 and pread64, but it's missing pwrite64. Change-Id: I02b4adf5a5e15e55e008ff1ba8113a75faf1c4e9
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/Compat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/utils/Compat.h b/include/utils/Compat.h
index c5f9d6a80..b2ba55ef1 100644
--- a/include/utils/Compat.h
+++ b/include/utils/Compat.h
@@ -33,6 +33,10 @@ static inline ssize_t pread64(int fd, void* buf, size_t nbytes, off64_t offset)
return pread(fd, buf, nbytes, offset);
}
+static inline ssize_t pwrite64(int fd, const void* buf, size_t nbytes, off64_t offset) {
+ return pwrite(fd, buf, nbytes, offset);
+}
+
#endif /* __APPLE__ */
#if defined(_WIN32)