diff options
Diffstat (limited to 'Source/kwsys/SystemInformation.cxx')
-rw-r--r-- | Source/kwsys/SystemInformation.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index beefd7d..2672730 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -88,6 +88,15 @@ typedef int siginfo_t; # include <ifaddrs.h> # define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN # endif +# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE) +# include <execinfo.h> +# if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE) +# include <cxxabi.h> +# endif +# if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP) +# include <dlfcn.h> +# endif +# endif #endif #if defined(__OpenBSD__) || defined(__NetBSD__) @@ -1734,12 +1743,12 @@ int SystemInformationImplementation::GetFullyQualifiedDomainName( { char host[NI_MAXHOST]={'\0'}; - socklen_t addrlen + const size_t addrlen = (fam==AF_INET?sizeof(struct sockaddr_in):sizeof(struct sockaddr_in6)); ierr=getnameinfo( ifa->ifa_addr, - addrlen, + static_cast<socklen_t>(addrlen), host, NI_MAXHOST, NULL, @@ -3836,7 +3845,8 @@ bool SystemInformationImplementation::QueryLinuxMemory() unsigned long temp; unsigned long cachedMem; unsigned long buffersMem; - char *r=fgets(buffer, sizeof(buffer), fd); // Skip "total: used:..." + // Skip "total: used:..." + char *r=fgets(buffer, static_cast<int>(sizeof(buffer)), fd); int status=0; if(r==buffer) { |