$OpenBSD: patch-lib_prot_c,v 1.4 2020/05/14 12:26:39 ajacoutot Exp $

64 bit time_t

Index: lib/prot.c
--- lib/prot.c.orig
+++ lib/prot.c
@@ -816,7 +816,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;
@@ -879,7 +879,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 {
