File: time32.patch

package info (click to toggle)
gavl 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,324 kB
  • sloc: ansic: 474,645; makefile: 305; sh: 109
file content (42 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Description: Fix usage of gmtime_t() on i386
 where time_t is only 32bit
Author: IOhannes m zömlnig <umlaeute@debian.org>
Origin: Debian
Forwarded: no
Last-Update: 2026-02-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- gavl.orig/gavl/http.c
+++ gavl/gavl/http.c
@@ -676,7 +676,8 @@
   {
   char date[80];
   struct tm tm;
-  strftime(date, sizeof(date),"%a, %d %b %Y %H:%M:%S GMT", gmtime_r(&t, &tm));
+  const time_t _t = (time_t)t;
+  strftime(date, sizeof(date),"%a, %d %b %Y %H:%M:%S GMT", gmtime_r(&_t, &tm));
   gavl_dictionary_set_string(h, name, date);
   }
 
--- gavl.orig/gavl/httpclient.c
+++ gavl/gavl/httpclient.c
@@ -166,8 +166,8 @@
   const char * cache_control;
   const char * cache_file;
   const char * mimetype;
-  time_t maxage = 0;
-  time_t mtime;
+  int64_t maxage = 0;
+  int64_t mtime;
 
   time_t cur;
 
@@ -1140,7 +1140,7 @@
                            const char * path)
   {
   const char * etag;
-  time_t mtime;
+  int64_t mtime;
 
   if(c->flags & FLAG_USE_PROXY)
     {