0001-unix-uxutils.h-fix-build-on-uclibc.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 3f30f3a7e3f07f5ca3cef0f405b02e22a018c6e4 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 9 May 2021 15:22:29 +0200
  4. Subject: [PATCH] unix/uxutils.h: fix build on uclibc
  5. Build on uclibc is broken since version 0.75 and commit
  6. 65383082bf0c49cec63f4b36001a40bd9b13edf6 because AT_HWCAP2 is used
  7. even if <sys/auxv.h> is not available:
  8. unix/uxutils.c: In function 'platform_aes_hw_available':
  9. unix/uxutils.c:13:22: error: 'AT_HWCAP2' undeclared (first use in this function)
  10. 13 | return getauxval(AT_HWCAP2) & HWCAP2_AES;
  11. | ^~~~~~~~~
  12. To fix this build failure, include <elf.h>
  13. Fixes:
  14. - http://autobuild.buildroot.org/results/726f7c5ce13e78ed91e827b872e9d7ccfa13f298
  15. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  16. [Upstream status: sent to Simon Tatham <anakin@pobox.com>]
  17. ---
  18. unix/uxutils.h | 2 ++
  19. 1 file changed, 2 insertions(+)
  20. diff --git a/unix/uxutils.h b/unix/uxutils.h
  21. index c9acff53..b80bf972 100644
  22. --- a/unix/uxutils.h
  23. +++ b/unix/uxutils.h
  24. @@ -18,6 +18,8 @@
  25. #if defined __arm__ || defined __aarch64__
  26. +#include <elf.h>
  27. +
  28. #ifdef HAVE_SYS_TYPES_H
  29. #include <sys/types.h>
  30. #endif
  31. --
  32. 2.30.2