mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
135 lines
4.8 KiB
Plaintext
135 lines
4.8 KiB
Plaintext
From bcf8c3806b5c0db7dee927e46d9e9dc39cd0c3b6 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
|
|
|
|
modified: src/imap-hibernate/imap-client.c
|
|
modified: src/imap-hibernate/imap-hibernate-client.c
|
|
modified: src/imap/imap-client-hibernate.c
|
|
modified: src/imap/imap-master-client.c
|
|
modified: src/lib-http/test-http-client-errors.c
|
|
modified: src/plugins/old-stats/mail-stats-fill.c
|
|
|
|
diff --git a/src/imap-hibernate/imap-client.c b/src/imap-hibernate/imap-client.c
|
|
index fa5edde..7ca09a8 100644
|
|
--- a/src/imap-hibernate/imap-client.c
|
|
+++ b/src/imap-hibernate/imap-client.c
|
|
@@ -185,11 +185,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 4065adc..4a110c4 100644
|
|
--- a/src/imap-hibernate/imap-hibernate-client.c
|
|
+++ b/src/imap-hibernate/imap-hibernate-client.c
|
|
@@ -167,9 +167,11 @@ 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);
|
|
return 0;
|
|
+#endif
|
|
}
|
|
|
|
static int
|
|
diff --git a/src/imap/imap-client-hibernate.c b/src/imap/imap-client-hibernate.c
|
|
index b29f500..bd9d3de 100644
|
|
--- a/src/imap/imap-client-hibernate.c
|
|
+++ b/src/imap/imap-client-hibernate.c
|
|
@@ -59,10 +59,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 84814f0..1d0dae3 100644
|
|
--- a/src/imap/imap-master-client.c
|
|
+++ b/src/imap/imap-master-client.c
|
|
@@ -176,10 +176,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;
|
|
}
|
|
|
|
@@ -198,6 +200,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",
|
|
@@ -206,6 +209,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/lib-http/test-http-client-errors.c b/src/lib-http/test-http-client-errors.c
|
|
index e127041..f41b4d2 100644
|
|
--- a/src/lib-http/test-http-client-errors.c
|
|
+++ b/src/lib-http/test-http-client-errors.c
|
|
@@ -18,7 +18,11 @@
|
|
#include "http-client.h"
|
|
|
|
#include <unistd.h>
|
|
+#ifdef __HAIKU__
|
|
+#include <signal.h>
|
|
+#else
|
|
#include <sys/signal.h>
|
|
+#endif
|
|
|
|
#define CLIENT_PROGRESS_TIMEOUT 10
|
|
#define SERVER_KILL_TIMEOUT_SECS 20
|
|
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.37.3
|
|
|