File: time64

package info (click to toggle)
libesmtp 1.1.0-3.2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 908 kB
  • sloc: ansic: 7,282; python: 37; sh: 13; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 653 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/headers.c
+++ b/headers.c
@@ -170,11 +170,11 @@
     {
 #ifdef HAVE_GETTIMEOFDAY
       if (gettimeofday (&tv, NULL) != -1) /* This shouldn't fail ... */
-	snprintf (buf, sizeof buf, "%ld.%ld.%d@%s", tv.tv_sec, tv.tv_usec,
+	      snprintf (buf, sizeof buf, "%lld.%lld.%d@%s", (long long)tv.tv_sec, (long long)tv.tv_usec,
 		  getpid (), message->session->localhost);
       else /* ... but if it does fall back to using time() */
 #endif
-      snprintf (buf, sizeof buf, "%ld.%d@%s", time (NULL),
+      snprintf (buf, sizeof buf, "%lld.%d@%s", (long long)time (NULL),
 		getpid (), message->session->localhost);
       message_id = buf;
     }