File: unbreak-arhmf.patch

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,236,292 kB
  • sloc: cpp: 7,619,567; ansic: 1,433,956; asm: 1,058,748; python: 252,146; f90: 94,671; objc: 70,753; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; awk: 3,523; makefile: 3,401; javascript: 2,272; xml: 892; fortran: 770
file content (28 lines) | stat: -rw-r--r-- 1,403 bytes parent folder | download | duplicates (5)
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
From c3ee9ea6952286c571595ee20c0656f8e6974150 Mon Sep 17 00:00:00 2001
From: "Mikhail R. Gadelha" <mikhail@igalia.com>
Date: Sat, 19 Jul 2025 14:30:18 -0300
Subject: [PATCH] [libc] Fix setitimer build when full_build=OFF

When we pull the headers from the system, we might get a suseconds_t
that's a long long, so add a cast to prevent a implicit conversion
error.
---
 libc/src/sys/time/linux/setitimer.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libc/src/sys/time/linux/setitimer.cpp b/libc/src/sys/time/linux/setitimer.cpp
index 1de0d43297760..fb163586e30d9 100644
--- a/libc/src/sys/time/linux/setitimer.cpp
+++ b/libc/src/sys/time/linux/setitimer.cpp
@@ -22,9 +22,9 @@ LLVM_LIBC_FUNCTION(int, setitimer,
     // There is no SYS_setitimer_time64 call, so we can't use time_t directly,
     // and need to convert it to long first.
     long new_value32[4] = {static_cast<long>(new_value->it_interval.tv_sec),
-                           new_value->it_interval.tv_usec,
+                           static_cast<long>(new_value->it_interval.tv_usec),
                            static_cast<long>(new_value->it_value.tv_sec),
-                           new_value->it_value.tv_usec};
+                           static_cast<long>(new_value->it_value.tv_usec)};
     long old_value32[4];
 
     ret = LIBC_NAMESPACE::syscall_impl<long>(SYS_setitimer, which, new_value32,