Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b28a709 authored by Elliott Hughes's avatar Elliott Hughes Committed by Android Git Automerger
Browse files

am ed561793: am fbb4188c: am d559d6c7: Merge "defined(HAVE_OFF_T) is really...

am ed561793: am fbb4188c: am d559d6c7: Merge "defined(HAVE_OFF_T) is really just !defined(__APPLE__)."

* commit 'ed561793':
  defined(HAVE_OFF_T) is really just !defined(__APPLE__).
parents 35d60174 ed561793
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -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"