summaryrefslogtreecommitdiff
path: root/x11-plugins/wmDownload/files/wmDownload-strtouq-musl.patch
blob: 3a9a5d00b206c4df5742b5cd6c16b1bd6912c3c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
https://bugs.gentoo.org/898922
From: Brahmajit Das <brahmajit.xyz@gmail.com>
Date: Sun, 14 May 2023 14:39:59 +0530
Subject: [PATCH] Don't use strtouq while building on non-glibc system

Bug: https://bugs.gentoo.org/898922
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
--- a/wmDownload.c
+++ b/wmDownload.c
@@ -205,7 +205,11 @@ void checknetstats ()
 				{
 					p = (char *)strtok (NULL, tokens);
 						
+#ifdef __GLIBC__
 					bytes = strtouq(p, NULL, 0);
+#else
+					bytes = strtoul(p, NULL, 0);
+#endif
 						
 					kbytes = (bytes == 0)?0:bytes/base;
 					bytes = bytes%base;
-- 
2.40.1