hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
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
From fdc8b5a205e2116408aeb9fd305e57f656e2e89d Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sun, 9 Aug 2020 17:06:26 +0200
Subject: [PATCH] src/util/rand_xor: Include stddef.h to fix build error
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
 
Fixes
 
In file included from ../src/util/rand_xor.c:29:
output/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35:
 error: unknown type name ‘size_t’
 extern int getrandom(void *__buf, size_t count, unsigned int flags)
 
seen with gcc version 8.3.0 (Buildroot 2020.02) and uClibc.
 
Patch sent upstream:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6248
 
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 src/util/rand_xor.c | 1 +
 1 file changed, 1 insertion(+)
 
diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c
index 81b64f1ea71..fcb481487fa 100644
--- a/src/util/rand_xor.c
+++ b/src/util/rand_xor.c
@@ -25,6 +25,7 @@
 #include "detect_os.h"
 
 #if !DETECT_OS_WINDOWS
+#include <stddef.h>
 #if defined(HAVE_GETRANDOM)
 #include <sys/random.h>
 #endif
-- 
2.27.0