$NetBSD: patch-aq,v 1.1 2009/02/05 13:45:28 tonio Exp $

Avoid crash with 64bit time_t.
From PR pkg/40548

--- mh.c.orig	2009-01-05 20:20:53.000000000 +0100
+++ mh.c
@@ -1242,8 +1242,8 @@ int maildir_open_new_message (MESSAGE * 
   omask = umask (mh_umask (dest));
   FOREVER
   {
-    snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%u_%d.%s%s",
-	      dest->path, subdir, time (NULL), (unsigned int)getpid (),
+    snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%lld.%u_%d.%s%s",
+	      dest->path, subdir, (long long)time (NULL), (unsigned int)getpid (),
 	      Counter++, NONULL (Hostname), suffix);
 
     dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n",
@@ -1328,8 +1328,8 @@ int maildir_commit_message (CONTEXT * ct
   /* construct a new file name. */
   FOREVER
   {
-    snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%u_%d.%s%s", subdir,
-	      time (NULL), (unsigned int)getpid (), Counter++, 
+    snprintf (path, _POSIX_PATH_MAX, "%s/%lld.%u_%d.%s%s", subdir,
+	      (long long)time (NULL), (unsigned int)getpid (), Counter++, 
 	      NONULL (Hostname), suffix);
     snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path);
 
