sigar_proc_port_get for solaris 10+ only
This commit is contained in:
1 parent
4a61c20405
commit
ddc153b679
1 file changed
+5
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user