Idea taken from
http://code.swtch.com/plan9port/issue/88/build-errors-and-warnings-at-openbsd-50
Fixes also the use of * in rc.
Julien
diff -rup 9base/lib9/dirread.c 9base-fixed/lib9/dirread.c
--- 9base/lib9/dirread.c Sun Feb 12 18:00:39 2012
+++ 9base-fixed/lib9/dirread.c Sun Feb 12 19:06:16 2012
@@ -18,11 +18,18 @@ mygetdents(int fd, struct dirent *buf, int n)
nn = getdirentries(fd, (void*)buf, n, &off);
return nn;
}
-#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
static int
mygetdents(int fd, struct dirent *buf, int n)
{
long off;
+ return getdirentries(fd, (void*)buf, n, &off);
+}
+#elif defined(__OpenBSD__)
+static int
+mygetdents(int fd, struct dirent *buf, int n)
+{
+ off_t off;
return getdirentries(fd, (void*)buf, n, &off);
}
#elif defined(__sun__) || defined(__NetBSD__)
diff -rup 9base/rc/havefork.c 9base-fixed/rc/havefork.c
--- 9base/rc/havefork.c Sun Feb 12 18:00:39 2012
+++ 9base-fixed/rc/havefork.c Sat Feb 11 02:06:47 2012
@@ -239,4 +239,4 @@ execforkexec(void)
}
addwaitpid(pid);
return pid;
-}
\ No newline at end of file
+}
diff -rup 9base/rc/haventfork.c 9base-fixed/rc/haventfork.c
--- 9base/rc/haventfork.c Sun Feb 12 18:00:39 2012
+++ 9base-fixed/rc/haventfork.c Sat Feb 11 02:06:53 2012
@@ -227,4 +227,4 @@ execforkexec(void)
}
free(argv);
return -1;
-}
\ No newline at end of file
+}