if ((ret = fstat(fd2, &st)) < 0) {
mail_index_file_set_syscall_error(index, path,
"fstat()");
- } else if (st.st_dev == dev && st.st_ino == ino) {
+ } else if (st.st_ino == ino && CMP_DEV_T(st.st_dev, dev)) {
/* same file, still broken */
} else {
(void)file_dotlock_delete(path, LOG_NEW_DOTLOCK_SUFFIX,
if (log->head != NULL &&
log->head->st_ino == st.st_ino &&
- log->head->st_dev == st.st_dev) {
+ CMP_DEV_T(log->head->st_dev, st.st_dev)) {
/* same file */
ret = mail_transaction_log_file_read_hdr(log->head, &st);
if (ret == 0 && log->head->lock_type == F_WRLCK) {
rec = *list;
if ((index_dir != NULL && st.st_ino == rec->index_dir_ino &&
- st.st_dev == rec->index_dir_dev) ||
+ CMP_DEV_T(st.st_dev, rec->index_dir_dev)) ||
(index_dir == NULL && st.st_ino == 0 &&
strcmp(mailbox_path, rec->mailbox_path) == 0)) {
rec->refcount++;