Author: mladen.turk(a)jboss.com
Date: 2007-10-11 11:50:12 -0400 (Thu, 11 Oct 2007)
New Revision: 1101
Modified:
trunk/sight/native/os/solaris/scm.c
trunk/sight/native/os/solaris/service.c
Log:
Solaris dirent has 1 byte d_name
Modified: trunk/sight/native/os/solaris/scm.c
===================================================================
--- trunk/sight/native/os/solaris/scm.c 2007-10-11 13:52:51 UTC (rev 1100)
+++ trunk/sight/native/os/solaris/scm.c 2007-10-11 15:50:12 UTC (rev 1101)
@@ -122,8 +122,9 @@
i++;
}
if (sd) {
- struct dirent *sent, sbuf;
- while (!readdir_r(sd, &sbuf, &sent)) {
+ struct dirent *sent;
+ char sbuf[PATH_MAX + sizeof(struct dirent)];
+ while (!readdir_r(sd, (struct dirent *)sbuf, &sent)) {
char sname[PATH_MAX];
struct stat sb;
if (!sent)
Modified: trunk/sight/native/os/solaris/service.c
===================================================================
--- trunk/sight/native/os/solaris/service.c 2007-10-11 13:52:51 UTC (rev 1100)
+++ trunk/sight/native/os/solaris/service.c 2007-10-11 15:50:12 UTC (rev 1101)
@@ -167,8 +167,9 @@
sretry:
if ((rd = opendir(rlpath))) {
- struct dirent *sent, sbuf;
- while (!readdir_r(rd, &sbuf, &sent)) {
+ struct dirent *sent;
+ char sbuf[PATH_MAX + sizeof(struct dirent)];;
+ while (!readdir_r(rd, (struct dirent *)sbuf, &sent)) {
char sname[PATH_MAX];
char smatch[PATH_MAX];
struct stat sb;
Show replies by date