(Illustration by Gaich Muramatsu)
This patch against Coda 5.2.20 makes it compile on FreeBSD 5. It changes
three things:
All three of these changes could potentially be made into autoconf tests.
Index: coda-src/venus/vproc.cc
retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- coda-src/venus/vproc.cc 7 Mar 2003 04:27:39 -0000 1.1.1.1 +++ coda-src/venus/vproc.cc 7 Mar 2003 04:55:35 -0000 1.2@@ -784,8 +784,10 @@
sp->st_lspare = 0;
#endif
+#if __FreeBSD__ < 5
sp->st_qspare[0] = 0;
sp->st_qspare[1] = 0;
Index: coda-src/vice/srv.cc
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- coda-src/vice/srv.cc 7 Mar 2003 04:27:39 -0000 1.1.1.1
+++ coda-src/vice/srv.cc 7 Mar 2003 05:01:33 -0000 1.2
@@ -1267,8 +1267,13 @@
char buf[100], buf2[100]; /* can't believe there will be more logs! */
struct dirent **namelist = NULL;
+#if __FreeBSD__ >= 5
+ count = scandir(".", &namelist, (int (*)(dirent *)) xselect,
+ (int (*)(const void *, const void *)) compar);
+#else
count = scandir(".", &namelist, (int (*)(const dirent *)) xselect,
(int (*)(const void *, const void *)) compar);
+#endif
/* It is safe now to blindly rename */
for (i = 0; i < count; i++) {
sprintf(buf, "SrvLog-%d", count-i);
retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- lib-src/kernel-includes/coda.h 7 Mar 2003 04:27:41 -0000 1.1.1.1 +++ lib-src/kernel-includes/coda.h 7 Mar 2003 04:40:46 -0000 1.2@@ -125,6 +125,10 @@
+#if __FreeBSD__ >= 5
+#define __BIT_TYPES_DEFINED__
+#endif
+
#ifndef __BIT_TYPES_DEFINED__
#define __BIT_TYPES_DEFINED__
typedef signed char int8_t;
Received on 2003-03-07 00:52:16