112 lines
4.1 KiB
Plaintext
112 lines
4.1 KiB
Plaintext
From c947608ad7763031b2feb604ba52b735f4916628 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Fri, 29 Apr 2016 18:25:58 +0000
|
|
Subject: Haiku patch
|
|
|
|
|
|
diff --git a/src/imap-hibernate/imap-client.c b/src/imap-hibernate/imap-client.c
|
|
index fc158f1..92f4b78 100644
|
|
--- a/src/imap-hibernate/imap-client.c
|
|
+++ b/src/imap-hibernate/imap-client.c
|
|
@@ -147,11 +147,13 @@ imap_client_move_back_send_callback(void *context, struct ostream *output)
|
|
str_append(str, "\tuserdb_fields=");
|
|
str_append_tabescaped(str, state->userdb_fields);
|
|
}
|
|
+#ifndef __HAIKU__
|
|
if (major(state->peer_dev) != 0 || minor(state->peer_dev) != 0) {
|
|
str_printfa(str, "\tpeer_dev_major=%lu\tpeer_dev_minor=%lu",
|
|
(unsigned long)major(state->peer_dev),
|
|
(unsigned long)minor(state->peer_dev));
|
|
}
|
|
+#endif
|
|
if (state->peer_ino != 0)
|
|
str_printfa(str, "\tpeer_ino=%llu", (unsigned long long)state->peer_ino);
|
|
if (state->state_size > 0) {
|
|
diff --git a/src/imap-hibernate/imap-hibernate-client.c b/src/imap-hibernate/imap-hibernate-client.c
|
|
index fe2bbf7..95bb861 100644
|
|
--- a/src/imap-hibernate/imap-hibernate-client.c
|
|
+++ b/src/imap-hibernate/imap-hibernate-client.c
|
|
@@ -153,8 +153,10 @@ imap_hibernate_client_parse_input(const char *const *args, pool_t pool,
|
|
*error_r = "Missing tag";
|
|
return -1;
|
|
}
|
|
+#ifndef __HAIKU__
|
|
if (peer_dev_major != 0 || peer_dev_minor != 0)
|
|
state_r->peer_dev = makedev(peer_dev_major, peer_dev_minor);
|
|
+#endif
|
|
return 0;
|
|
}
|
|
|
|
diff --git a/src/imap/imap-client-hibernate.c b/src/imap/imap-client-hibernate.c
|
|
index 40a05e2..f65bdfe 100644
|
|
--- a/src/imap/imap-client-hibernate.c
|
|
+++ b/src/imap/imap-client-hibernate.c
|
|
@@ -55,10 +55,12 @@ static void imap_hibernate_write_cmd(struct client *client, string_t *cmd,
|
|
str_printfa(cmd, "\tidle_notify_interval=%u",
|
|
client->set->imap_idle_notify_interval);
|
|
if (fstat(client->fd_in, &peer_st) == 0) {
|
|
+#ifndef __HAIKU__
|
|
str_printfa(cmd, "\tpeer_dev_major=%lu\tpeer_dev_minor=%lu\tpeer_ino=%llu",
|
|
(unsigned long)major(peer_st.st_dev),
|
|
(unsigned long)minor(peer_st.st_dev),
|
|
(unsigned long long)peer_st.st_ino);
|
|
+#endif
|
|
}
|
|
|
|
str_append(cmd, "\tsession=");
|
|
diff --git a/src/imap/imap-master-client.c b/src/imap/imap-master-client.c
|
|
index 9b2e2df..44d6a33 100644
|
|
--- a/src/imap/imap-master-client.c
|
|
+++ b/src/imap/imap-master-client.c
|
|
@@ -154,10 +154,12 @@ imap_master_client_parse_input(const char *const *args, pool_t pool,
|
|
master_input_r->state_import_idle_continue = TRUE;
|
|
}
|
|
}
|
|
+#ifndef __HAIKU__
|
|
if (peer_dev_major != 0 || peer_dev_minor != 0) {
|
|
master_input_r->peer_dev =
|
|
makedev(peer_dev_major, peer_dev_minor);
|
|
}
|
|
+#endif
|
|
return 0;
|
|
}
|
|
|
|
@@ -176,6 +178,7 @@ static int imap_master_client_verify(const struct imap_master_input *master_inpu
|
|
}
|
|
if (peer_st.st_ino != master_input->peer_ino ||
|
|
!CMP_DEV_T(peer_st.st_dev, master_input->peer_dev)) {
|
|
+#ifndef __HAIKU__
|
|
*error_r = t_strdup_printf(
|
|
"BUG: Expected peer device=%lu,%lu inode=%s doesn't match "
|
|
"client fd's actual device=%lu,%lu inode=%s",
|
|
@@ -184,6 +187,7 @@ static int imap_master_client_verify(const struct imap_master_input *master_inpu
|
|
(unsigned long)major(master_input->peer_dev),
|
|
(unsigned long)minor(master_input->peer_dev),
|
|
dec2str(master_input->peer_ino));
|
|
+#endif
|
|
return -1;
|
|
}
|
|
return 0;
|
|
diff --git a/src/plugins/old-stats/mail-stats-fill.c b/src/plugins/old-stats/mail-stats-fill.c
|
|
index 10d8c39..c57b1c5 100644
|
|
--- a/src/plugins/old-stats/mail-stats-fill.c
|
|
+++ b/src/plugins/old-stats/mail-stats-fill.c
|
|
@@ -134,12 +134,14 @@ void mail_stats_fill(struct stats_user *suser, struct mail_stats *stats_r)
|
|
|
|
stats_r->user_cpu = usage.ru_utime;
|
|
stats_r->sys_cpu = usage.ru_stime;
|
|
+#ifndef __HAIKU__
|
|
stats_r->min_faults = usage.ru_minflt;
|
|
stats_r->maj_faults = usage.ru_majflt;
|
|
stats_r->vol_cs = usage.ru_nvcsw;
|
|
stats_r->invol_cs = usage.ru_nivcsw;
|
|
stats_r->disk_input = (unsigned long long)usage.ru_inblock * 512ULL;
|
|
stats_r->disk_output = (unsigned long long)usage.ru_oublock * 512ULL;
|
|
+#endif
|
|
i_gettimeofday(&stats_r->clock_time);
|
|
process_read_io_stats(stats_r);
|
|
user_trans_stats_get(suser, stats_r);
|
|
--
|
|
2.28.0
|
|
|