From f586d61a0bcc58af18236a8761b4bddd2bf511a3 Mon Sep 17 00:00:00 2001 From: jasper Date: Wed, 7 May 2014 08:11:57 +0000 Subject: [PATCH] fix another crasher due tue 64-bit time-t; found and fixed by Brian Landy --- sysutils/monit/Makefile | 3 ++- sysutils/monit/patches/patch-src_sendmail_c | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 sysutils/monit/patches/patch-src_sendmail_c diff --git a/sysutils/monit/Makefile b/sysutils/monit/Makefile index bde67b6e63e..801e2db1a69 100644 --- a/sysutils/monit/Makefile +++ b/sysutils/monit/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.31 2014/05/06 09:20:56 jasper Exp $ +# $OpenBSD: Makefile,v 1.32 2014/05/07 08:11:57 jasper Exp $ COMMENT= monitoring and managing daemons utility DISTNAME= monit-5.8 +REVISION= 0 CATEGORIES= sysutils diff --git a/sysutils/monit/patches/patch-src_sendmail_c b/sysutils/monit/patches/patch-src_sendmail_c new file mode 100644 index 00000000000..93d774a3057 --- /dev/null +++ b/sysutils/monit/patches/patch-src_sendmail_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-src_sendmail_c,v 1.1 2014/05/07 08:11:57 jasper Exp $ + +Fix for 64bit time_t. + +--- src/sendmail.c.orig Wed May 7 09:59:58 2014 ++++ src/sendmail.c Wed May 7 10:00:26 2014 +@@ -287,7 +287,7 @@ int sendmail(Mail_T mail) { + do_send(&S, "MIME-Version: 1.0\r\n"); + do_send(&S, "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n"); + do_send(&S, "Content-Transfer-Encoding: 8bit\r\n"); +- do_send(&S, "Message-Id: <%ld.%lu@%s>\r\n", time(NULL), random(), S.localhost); ++ do_send(&S, "Message-Id: <%lld.%lu@%s>\r\n", time(NULL), random(), S.localhost); + do_send(&S, "\r\n"); + do_send(&S, "%s\r\n", m->message); + do_send(&S, ".\r\n");