110-freebsd-compat.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 6eab64c3adc7a38c322cd4d9a1a1881f2d49cb9c Mon Sep 17 00:00:00 2001
  2. From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
  3. Date: Tue, 15 Oct 2013 00:10:56 +0300
  4. Subject: [PATCH] SystemInformation: Include backtrace-related headers on
  5. FreeBSD
  6. This was probably broken for a long while, but the problem was not apparent
  7. because the check for execinfo.h would fail by default because
  8. -I/usr/local/include was not being passed to the compiler when making the
  9. checks for the header's existence.
  10. Now that very recent FreeBSD versions (ie. 10-CURRENT) have NetBSD's
  11. libexecinfo in base (and it is thus installed into /usr), the
  12. backtrace-related checks would pass, but the required headers were not being
  13. included in SystemInformation.cxx.
  14. Change-Id: I3b91ed7ac0e6878035aee202b3336c536cc6d2ff
  15. ---
  16. Source/kwsys/SystemInformation.cxx | 9 +++++++++
  17. 1 file changed, 9 insertions(+)
  18. diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
  19. index 7c31f3a..2672730 100644
  20. --- a/Source/kwsys/SystemInformation.cxx
  21. +++ b/Source/kwsys/SystemInformation.cxx
  22. @@ -88,6 +88,15 @@ typedef int siginfo_t;
  23. # include <ifaddrs.h>
  24. # define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
  25. # endif
  26. +# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
  27. +# include <execinfo.h>
  28. +# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
  29. +# include <cxxabi.h>
  30. +# endif
  31. +# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
  32. +# include <dlfcn.h>
  33. +# endif
  34. +# endif
  35. #endif
  36. #if defined(__OpenBSD__) || defined(__NetBSD__)
  37. --
  38. 1.7.10.4