@@ -23,10 +23,16 @@ #include #import "OFStream.h" +#ifdef __ANDROID__ +typedef long long of_offset_t; +#else +typedef off_t of_offset_t; +#endif + /*! * @class OFSeekableStream OFSeekableStream.h ObjFW/OFSeekableStream.h * * @brief A stream that supports seeking. * @@ -48,12 +54,12 @@ * `SEEK_SET` | Seek to the specified byte * `SEEK_CUR` | Seek to the current location + offset * `SEEK_END` | Seek to the end of the stream + offset * @return The new offset form the start of the file */ -- (off_t)seekToOffset: (off_t)offset - whence: (int)whence; +- (of_offset_t)seekToOffset: (of_offset_t)offset + whence: (int)whence; /*! * @brief Seek the stream on the lowlevel. * * @warning Do not call this directly! @@ -69,8 +75,8 @@ * `SEEK_SET` | Seek to the specified byte * `SEEK_CUR` | Seek to the current location + offset * `SEEK_END` | Seek to the end of the stream + offset * @return The new offset from the start of the file */ -- (off_t)lowlevelSeekToOffset: (off_t)offset - whence: (int)whence; +- (of_offset_t)lowlevelSeekToOffset: (of_offset_t)offset + whence: (int)whence; @end