diff --git a/SystemInformation.cxx b/SystemInformation.cxx index beefd7d73..7c31f3a1b 100644 --- a/SystemInformation.cxx +++ b/SystemInformation.cxx @@ -1734,12 +1734,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(addrlen), host, NI_MAXHOST, NULL, @@ -3836,7 +3836,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(sizeof(buffer)), fd); int status=0; if(r==buffer) { diff --git a/SystemTools.cxx b/SystemTools.cxx index e9a1fd37d..749002d1c 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -152,11 +152,6 @@ public: #define _chdir chdir #endif -#if defined(__HAIKU__) -#include -#include -#endif - #if defined(__BEOS__) && !defined(__ZETA__) #include #include diff --git a/testDynamicLoader.cxx b/testDynamicLoader.cxx index dd6d60390..1bff707b0 100644 --- a/testDynamicLoader.cxx +++ b/testDynamicLoader.cxx @@ -15,14 +15,10 @@ #include KWSYS_HEADER(ios/iostream) #include KWSYS_HEADER(stl/string) -#if defined(__BEOS__) +#if defined(__BEOS__) || defined(__HAIKU__) #include /* disable_debugger() API. */ #endif -#if defined(__HAIKU__) -#include /* disable_debugger() API. */ -#endif - // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. #if 0