fix another crasher due tue 64-bit time-t; found and fixed by Brian Landy

This commit is contained in:
jasper 2014-05-07 08:11:57 +00:00
parent 875e05abc4
commit f586d61a0b
2 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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");