2
0

110-freebsd-compat.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. --- a/Source/kwsys/SystemInformation.cxx
  19. +++ b/Source/kwsys/SystemInformation.cxx
  20. @@ -89,6 +89,15 @@ typedef int siginfo_t;
  21. # include <ifaddrs.h>
  22. # define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
  23. # endif
  24. +# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
  25. +# include <execinfo.h>
  26. +# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
  27. +# include <cxxabi.h>
  28. +# endif
  29. +# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
  30. +# include <dlfcn.h>
  31. +# endif
  32. +# endif
  33. #endif
  34. #if defined(KWSYS_SYS_HAS_MACHINE_CPU_H)