reverted ino_t cast and added fix only for android
This commit is contained in:
parent
6b1037eff5
commit
cb114a80e1
|
@ -109,7 +109,15 @@ namespace libtorrent {
|
||||||
WIN32_FIND_DATAW m_fd;
|
WIN32_FIND_DATAW m_fd;
|
||||||
#else
|
#else
|
||||||
DIR* m_handle;
|
DIR* m_handle;
|
||||||
|
#ifdef TORRENT_ANDROID
|
||||||
|
// this is due to a documented bug in android related to a wrong type
|
||||||
|
// of ino_t, for general discussion and internal changes see:
|
||||||
|
// https://issuetracker.google.com/issues/37011207 - for general discussion
|
||||||
|
// https://android-review.googlesource.com/#/c/platform/system/core/+/123482/
|
||||||
|
std::uint64_t m_inode;
|
||||||
|
#else
|
||||||
ino_t m_inode;
|
ino_t m_inode;
|
||||||
|
#endif // TORRENT_ANDROID
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
#endif
|
#endif
|
||||||
bool m_done;
|
bool m_done;
|
||||||
|
|
|
@ -416,7 +416,7 @@ static_assert(!(open_mode::sparse & open_mode::attribute_mask), "internal flags
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if ((de = ::readdir(m_handle)) != nullptr)
|
if ((de = ::readdir(m_handle)) != nullptr)
|
||||||
{
|
{
|
||||||
m_inode = static_cast<ino_t>(de->d_ino);
|
m_inode = de->d_ino;
|
||||||
m_name = de->d_name;
|
m_name = de->d_name;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue