0001-util.h-include-sys-reg.h-when-libc-glibc.patch 845 B

123456789101112131415161718192021222324252627282930313233
  1. From 06011ce55b1e892e863568a73d64eebc6389544f Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Thu, 13 Jul 2017 17:14:05 -0700
  4. Subject: [PATCH] util.h: include <sys/reg.h> when libc != glibc
  5. For musl libc it is required to include <sys/reg.h> to
  6. have __WORDSIZE defined to e.g. 32 for arm*-musl.
  7. Taken from void-linux
  8. https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dracut/patches/musl-__wordsize.patch
  9. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. ---
  11. install/util.h | 3 +++
  12. 1 file changed, 3 insertions(+)
  13. diff --git a/install/util.h b/install/util.h
  14. index 2ad3254d..062626ec 100644
  15. --- a/install/util.h
  16. +++ b/install/util.h
  17. @@ -36,6 +36,9 @@
  18. #include <sys/stat.h>
  19. #include <dirent.h>
  20. #include <sys/resource.h>
  21. +#if !defined(__GLIBC__)
  22. +#include <sys/reg.h>
  23. +#endif
  24. #include "macro.h"
  25. --
  26. 2.13.2