1From fdc8b5a205e2116408aeb9fd305e57f656e2e89d Mon Sep 17 00:00:00 2001
2From: Bernd Kuhls <bernd.kuhls@t-online.de>
3Date: Sun, 9 Aug 2020 17:06:26 +0200
4Subject: [PATCH] src/util/rand_xor: Include stddef.h to fix build error
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Fixes
10
11In file included from ../src/util/rand_xor.c:29:
12output/host/x86_64-buildroot-linux-uclibc/sysroot/usr/include/sys/random.h:27:35:
13 error: unknown type name ‘size_t’
14 extern int getrandom(void *__buf, size_t count, unsigned int flags)
15
16seen with gcc version 8.3.0 (Buildroot 2020.02) and uClibc.
17
18Patch sent upstream:
19https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6248
20
21Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
22---
23 src/util/rand_xor.c | 1 +
24 1 file changed, 1 insertion(+)
25
26diff --git a/src/util/rand_xor.c b/src/util/rand_xor.c
27index 81b64f1ea71..fcb481487fa 100644
28--- a/src/util/rand_xor.c
29+++ b/src/util/rand_xor.c
30@@ -25,6 +25,7 @@
31 #include "detect_os.h"
32
33 #if !DETECT_OS_WINDOWS
34+#include <stddef.h>
35 #if defined(HAVE_GETRANDOM)
36 #include <sys/random.h>
37 #endif
38--
392.27.0
40
41