Hi, I’m OpenIndiana user, and found that 7.2ce release is not building on it (and I guess on other solaris forks too). This patch demonstrates whan have to be changed. I don’t say it is a good fix and have to be integrated as is, but this is what I need to have it building at least.
diff --git c/src/libc/stdio.h w/src/libc/stdio.h
index 12ba9b9..7a1f876 100644
--- c/src/libc/stdio.h
+++ w/src/libc/stdio.h
@@ -276,7 +276,9 @@ char *tmpnam(char *);
int vsprintf(char * __restrict, const char * __restrict, va_list);
#endif
+#ifndef __sun
int rename(const char *src, const char *dst);
+#endif
/*
* Bk extension
diff --git c/src/libc/utils/dirs.c w/src/libc/utils/dirs.c
index 24a94bd..fd9e1a3 100644
--- c/src/libc/utils/dirs.c
+++ w/src/libc/utils/dirs.c
@@ -186,7 +186,7 @@ getdir(char *dir)
{
char **lines = 0;
DIR *d;
- int type;
+ int type = '?';
struct dirent *e;
unless (d = opendir(dir)) {
@@ -198,12 +198,14 @@ getdir(char *dir)
if (streq(e->d_name, ".") || streq(e->d_name, "..")) {
continue;
}
+#ifndef __sun
switch (e->d_type) {
case DT_DIR: type = 'd'; break;
case DT_REG: type = 'f'; break;
case DT_LNK: type = 'l'; break;
default: type = '?'; break;
}
+#endif
lines = addLine(lines, aprintf("%s%c%c", e->d_name, 0, type));
}
closedir(d);