File: fix-localtime-arm32.patch

package info (click to toggle)
euslisp 9.31%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 55,448 kB
  • sloc: ansic: 41,610; lisp: 3,339; makefile: 286; sh: 238; asm: 138; python: 53
file content (24 lines) | stat: -rw-r--r-- 754 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
Description: Fix arm32 build
 On arm32, localtime_r in LOCALTIME in unixcall.c returns NULL in some situation.
 .
 euslisp (9.31+1) unstable; urgency=low
 .
Author: Kei Okada <kei.okada@gmail.com>

---
Origin: other
Reviewed-By: Kei Okada <kei.okada@gmail.com>
Last-Update: 2024-12-19

Index: euslisp.debian.salsa/lisp/c/unixcall.c
===================================================================
--- euslisp.debian.salsa.orig/lisp/c/unixcall.c
+++ euslisp.debian.salsa/lisp/c/unixcall.c
@@ -142,6 +142,7 @@ pointer argv[];
   if (n==1) clock=coerceintval(argv[0]);
   else clock=time(0);
   tms=localtime_r((time_t *)&clock,&res); /* localtime-->localtime_r */
+  if (tms == NULL) tms = &res;
   timevec=makevector(C_VECTOR,10);
   vpush(timevec);