$OpenBSD: patch-lib_prot_c,v 1.3 2018/05/18 11:16:43 ajacoutot Exp $

64 bit time_t

Index: lib/prot.c
--- lib/prot.c.orig
+++ lib/prot.c
@@ -801,7 +801,7 @@ EXPORTED int prot_fill(struct protstream *s)
         char timebuf[20];
 
         time(&newtime);
-        snprintf(timebuf, sizeof(timebuf), "<%ld<", newtime);
+        snprintf(timebuf, sizeof(timebuf), "<%lld<", newtime);
         n = write(s->logfd, timebuf, strlen(timebuf));
 
         left = s->cnt;
@@ -864,7 +864,7 @@ static void prot_flush_log(struct protstream *s)
         char timebuf[20];
 
         time(&newtime);
-        snprintf(timebuf, sizeof(timebuf), ">%ld>", newtime);
+        snprintf(timebuf, sizeof(timebuf), ">%lld>", newtime);
         n = write(s->logfd, timebuf, strlen(timebuf));
 
         do {
