summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-09-23 16:05:18 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-23 16:05:18 +0000
commit830b77bc5c492d98eb0bc1ca515478c2e116991a (patch)
treee94b4cb1841761d211577f9ae8fb20a05031fd51 /include
parent2e826dc2b143f9a4617a50153c96487a16a045ad (diff)
parentfbb4188cfac18b457801cf3e304bfa39dd29dde8 (diff)
downloadsystem_core-830b77bc5c492d98eb0bc1ca515478c2e116991a.zip
system_core-830b77bc5c492d98eb0bc1ca515478c2e116991a.tar.gz
system_core-830b77bc5c492d98eb0bc1ca515478c2e116991a.tar.bz2
am fbb4188c: am d559d6c7: Merge "defined(HAVE_OFF_T) is really just !defined(__APPLE__)."
* commit 'fbb4188cfac18b457801cf3e304bfa39dd29dde8': defined(HAVE_OFF_T) is really just !defined(__APPLE__).
Diffstat (limited to 'include')
-rw-r--r--include/utils/Compat.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/utils/Compat.h b/include/utils/Compat.h
index fb7748e..20a6920 100644
--- a/include/utils/Compat.h
+++ b/include/utils/Compat.h
@@ -19,11 +19,9 @@
#include <unistd.h>
-/* Compatibility definitions for non-Linux (i.e., BSD-based) hosts. */
-#ifndef HAVE_OFF64_T
-#if _FILE_OFFSET_BITS < 64
-#error "_FILE_OFFSET_BITS < 64; large files are not supported on this platform"
-#endif /* _FILE_OFFSET_BITS < 64 */
+#if defined(__APPLE__)
+
+/* Mac OS has always had a 64-bit off_t, so it doesn't have off64_t. */
typedef off_t off64_t;
@@ -31,13 +29,11 @@ static inline off64_t lseek64(int fd, off64_t offset, int whence) {
return lseek(fd, offset, whence);
}
-#ifdef HAVE_PREAD
static inline ssize_t pread64(int fd, void* buf, size_t nbytes, off64_t offset) {
return pread(fd, buf, nbytes, offset);
}
-#endif
-#endif /* !HAVE_OFF64_T */
+#endif /* __APPLE__ */
#if HAVE_PRINTF_ZD
# define ZD "%zd"