diff --git a/io/nativefilestream.cpp b/io/nativefilestream.cpp index 4705184..8bc0871 100644 --- a/io/nativefilestream.cpp +++ b/io/nativefilestream.cpp @@ -143,7 +143,9 @@ NativeFileStream::NativeFileStream() NativeFileStream::NativeFileStream(NativeFileStream &&other) : iostream(other.m_filebuf.release()) , m_filebuf(rdbuf()) +#if !defined(__ANDROID_API__) || !defined(__ANDROID_API_N__) || (__ANDROID_API__ < __ANDROID_API_N__) , m_fileHandle(other.m_fileHandle) +#endif { } diff --git a/io/nativefilestream.h b/io/nativefilestream.h index 2322a21..acd0326 100644 --- a/io/nativefilestream.h +++ b/io/nativefilestream.h @@ -28,7 +28,9 @@ public: void open(const std::string &path, std::ios_base::openmode openMode); void openFromFileDescriptor(int fileDescriptor, std::ios_base::openmode openMode); void close(); +#if !defined(__ANDROID_API__) || !defined(__ANDROID_API_N__) || (__ANDROID_API__ < __ANDROID_API_N__) FILE fileHandle(); +#endif static std::unique_ptr> makeFileBuffer(const std::string &path, ios_base::openmode openMode); static std::unique_ptr> makeFileBuffer(int fileDescriptor, ios_base::openmode openMode); @@ -40,7 +42,9 @@ private: void setFileBuffer(std::unique_ptr> buffer); std::unique_ptr> m_filebuf; +#if !defined(__ANDROID_API__) || !defined(__ANDROID_API_N__) || (__ANDROID_API__ < __ANDROID_API_N__) FILE m_fileHandle; +#endif }; inline NativeFileStream::NativeFileStream(const std::string &path, ios_base::openmode openMode) @@ -55,6 +59,7 @@ inline NativeFileStream::NativeFileStream(int fileDescriptor, ios_base::openmode openFromFileDescriptor(fileDescriptor, openMode); } +#if !defined(__ANDROID_API__) || !defined(__ANDROID_API_N__) || (__ANDROID_API__ < __ANDROID_API_N__) /*! * \brief Returns the underlying file handle if possible; otherwise the behaviour is undefined. * \deprecated Not implemented for any backend and will be removed in v5. @@ -64,6 +69,7 @@ inline FILE NativeFileStream::fileHandle() { return m_fileHandle; } +#endif #else // CPP_UTILITIES_USE_NATIVE_FILE_BUFFER