942-asan-fix-missing-include-signal-h.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 205aa8e97bab553e5e6fe45896325e97962de704 Mon Sep 17 00:00:00 2001
  2. From: Rolf Eike Beer <eb@emlix.com>
  3. Date: Wed, 8 Feb 2017 11:42:52 +0100
  4. Subject: [PATCH] asan: fix missing include of signal.h
  5. This breaks when building gcc 4.9.4 / 5.4.0 with
  6. target_platform=powerpc-unknown-linux-gnu with glibc 2.25:
  7. ../../../../gcc-host/libsanitizer/asan/asan_linux.cc: In function 'bool __asan::AsanInterceptsSignal(int)':
  8. ../../../../gcc-host/libsanitizer/asan/asan_linux.cc:222:20: error: 'SIGSEGV' was not declared in this scope
  9. return signum == SIGSEGV && common_flags()->handle_segv;
  10. This has been verified to apply to at least 4.9.4 and up to 5.4,
  11. the code has been reworked for gcc 6.
  12. Resolves (Buildroot) Bug: https://bugs.busybox.net/show_bug.cgi?id=10061
  13. Upstream: https://patchwork.ozlabs.org/patch/725596/
  14. Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
  15. ---
  16. libsanitizer/asan/asan_linux.cc | 1 +
  17. 1 file changed, 1 insertion(+)
  18. diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
  19. index c504168..59087b9 100644
  20. --- a/libsanitizer/asan/asan_linux.cc
  21. +++ b/libsanitizer/asan/asan_linux.cc
  22. @@ -29,6 +29,7 @@
  23. #include <dlfcn.h>
  24. #include <fcntl.h>
  25. #include <pthread.h>
  26. +#include <signal.h>
  27. #include <stdio.h>
  28. #include <unistd.h>
  29. #include <unwind.h>