mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 22:52:31 +00:00
Fix Link Time Optimizations
This commit fixes compiling rTorrent with LTO (Link Time Optimizations). We just need to rename from variables in the directory_entry structure to avoid ODR and ZLIB conflicts.
This commit is contained in:
@@ -83,19 +83,19 @@ Directory::update(int flags) {
|
||||
|
||||
#ifdef __sun__
|
||||
stat(entry->d_name, &s);
|
||||
itr->d_fileno = entry->d_ino;
|
||||
itr->d_reclen = 0;
|
||||
itr->d_type = s.st_mode;
|
||||
itr->s_fileno = entry->d_ino;
|
||||
itr->s_reclen = 0;
|
||||
itr->s_type = s.st_mode;
|
||||
#else
|
||||
itr->d_fileno = entry->d_fileno;
|
||||
itr->d_reclen = entry->d_reclen;
|
||||
itr->d_type = entry->d_type;
|
||||
itr->s_fileno = entry->d_fileno;
|
||||
itr->s_reclen = entry->d_reclen;
|
||||
itr->s_type = entry->d_type;
|
||||
#endif
|
||||
|
||||
#ifdef DIRENT_NAMLEN_EXISTS_FOOBAR
|
||||
itr->d_name = std::string(entry->d_name, entry->d_name + entry->d_namlen);
|
||||
itr->s_name = std::string(entry->d_name, entry->d_name + entry->d_namlen);
|
||||
#else
|
||||
itr->d_name = std::string(entry->d_name);
|
||||
itr->s_name = std::string(entry->d_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user