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:
stickz
2024-09-01 08:20:01 -04:00
parent 4e246a401f
commit ea3828a17e
7 changed files with 29 additions and 29 deletions
+8 -8
View File
@@ -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
}