mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 00:30:06 +02:00
134 lines
4.7 KiB
Plaintext
Executable File
134 lines
4.7 KiB
Plaintext
Executable File
From b58d8af46ef7dc1d79da5460ef1b2f790e9b614e 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/Makefile.am b/Makefile.am
|
|
index a7be896..96911d8 100644
|
|
--- a/Makefile.am
|
|
+++ b/Makefile.am
|
|
@@ -1,3 +1,4 @@
|
|
+ACLOCAL_AMFLAGS = -I.
|
|
aclocaldir = $(datadir)/aclocal
|
|
|
|
SUBDIRS = \
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 2662d24..dc1effb 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -392,7 +392,7 @@ dnl **
|
|
dnl ** just some generic stuff...
|
|
dnl **
|
|
|
|
-AC_SEARCH_LIBS(socket, socket)
|
|
+AC_SEARCH_LIBS(socket, socket network)
|
|
AC_SEARCH_LIBS(inet_addr, nsl)
|
|
AC_SEARCH_LIBS(fdatasync, rt, [
|
|
AC_DEFINE(HAVE_FDATASYNC,, [Define if you have fdatasync()])
|
|
diff --git a/src/imap-hibernate/imap-client.c b/src/imap-hibernate/imap-client.c
|
|
index 5c7209e..0110f42 100644
|
|
--- a/src/imap-hibernate/imap-client.c
|
|
+++ b/src/imap-hibernate/imap-client.c
|
|
@@ -117,11 +117,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 9bec027..cfc866b 100644
|
|
--- a/src/imap-hibernate/imap-hibernate-client.c
|
|
+++ b/src/imap-hibernate/imap-hibernate-client.c
|
|
@@ -138,8 +138,10 @@ imap_hibernate_client_parse_input(const char *const *args, pool_t pool,
|
|
state_r->state_size = state_buf->used;
|
|
}
|
|
}
|
|
+#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 c2704b3..84f5fea 100644
|
|
--- a/src/imap/imap-client-hibernate.c
|
|
+++ b/src/imap/imap-client-hibernate.c
|
|
@@ -51,10 +51,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
|
|
}
|
|
|
|
if (client->session_id != NULL) {
|
|
diff --git a/src/imap/imap-master-client.c b/src/imap/imap-master-client.c
|
|
index d562d1b..37a6445 100644
|
|
--- a/src/imap/imap-master-client.c
|
|
+++ b/src/imap/imap-master-client.c
|
|
@@ -142,10 +142,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;
|
|
}
|
|
|
|
@@ -164,6 +166,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",
|
|
@@ -172,6 +175,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/stats/mail-stats-fill.c b/src/plugins/stats/mail-stats-fill.c
|
|
index 7c48f6f..a7d2ed4 100644
|
|
--- a/src/plugins/stats/mail-stats-fill.c
|
|
+++ b/src/plugins/stats/mail-stats-fill.c
|
|
@@ -118,12 +118,14 @@ void mail_stats_fill(struct stats_user *suser, struct mail_stats *stats_r)
|
|
memset(&usage, 0, sizeof(usage));
|
|
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
|
|
(void)gettimeofday(&stats_r->clock_time, NULL);
|
|
process_read_io_stats(stats_r);
|
|
user_trans_stats_get(suser, stats_r);
|
|
--
|
|
2.2.2
|
|
|