sigar_proc_port_get for solaris 10+ only

This commit is contained in:
Doug MacEachern 2007-12-03 18:22:34 +00:00
parent 4a61c20405
commit ddc153b679
1 changed files with 5 additions and 1 deletions

View File

@ -2630,7 +2630,7 @@ static int find_port(sigar_t *sigar, struct ps_prochandle *phandle,
while ((ent = readdir(dirp))) {
int fd;
if (!isdigit(ent->d_name[0])) {
if (!sigar_isdigit(ent->d_name[0])) {
continue;
}
fd = atoi(ent->d_name);
@ -2690,6 +2690,10 @@ int sigar_proc_port_get(sigar_t *sigar, int protocol,
sigar_proc_list_t pids;
int i, status, found=0;
if (sigar->solaris_version < 10) {
return SIGAR_ENOTIMPL;
}
if ((status = sigar_init_libproc(sigar)) != SIGAR_OK) {
return SIGAR_ENOTIMPL;
}