--- ApMon.h_orig 2009-01-07 10:08:19.000000000 +0100 +++ ApMon.h 2009-01-07 10:08:19.000000000 +0100 @@ -81,6 +81,9 @@ #ifdef __APPLE__ #include +#elif defined __sun +#include +#include #else #include #endif --- ApMon.cpp_orig 2009-01-07 11:26:21.842637000 +0100 +++ ApMon.cpp 2009-01-07 11:27:10.901667000 +0100 @@ -40,7 +40,7 @@ #include "proc_utils.h" #include "monitor_utils.h" -#include +#include using namespace apmon_utils; using namespace apmon_mon_utils; @@ -433,6 +433,8 @@ char ip[4], tmp_s[20]; #ifdef __APPLE__ memcpy(ip, ifr.ifr_addr.sa_data+2, 4); +#elif defined __sun + memcpy(ip, ifr.ifr_addr.sa_data+2, 4); #else memcpy(ip, ifr.ifr_hwaddr.sa_data+2, 4); #endif --- utils.cpp_orig 2007-11-22 10:53:31.000000000 +0100 +++ utils.cpp 2009-01-07 10:52:27.321799000 +0100 @@ -507,10 +507,18 @@ pthread_mutex_lock(&logger_mutex); -#ifndef WIN32 +#ifndef WIN32 // UNIX char cbuf[50]; +#ifdef __sun // solaris +#ifndef __sun__ // CC compiler suite on solaris + strcpy(time_s, ctime_r(&crtTime, cbuf, strlen(cbuf))); +#else //gcc compiler suite on solaris strcpy(time_s, ctime_r(&crtTime, cbuf)); +#endif #else + strcpy(time_s, ctime_r(&crtTime, cbuf)); +#endif +#else //WIN32 strcpy(time_s, ctime(&crtTime)); #endif len = strlen(time_s); time_s[len - 1] = 0;