0004-src-util-rand_xor-Include-stddef.h-to-fix-build-erro.patch 1.1 KB

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