plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 0613fe4b84dff47013d2e97345d6c26b0f4a9ef3
parent 48458cb2b1a35e034dacd18017365a97e2bfb9c4
Author: rsc <devnull@localhost>
Date:   Tue, 19 Jul 2005 22:59:09 +0000

fix freebsd

Diffstat:
Msrc/cmd/venti/srv/part.c | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/cmd/venti/srv/part.c b/src/cmd/venti/srv/part.c @@ -1,7 +1,13 @@ #ifdef PLAN9PORT /* SORRY! */ #include <u.h> #include <sys/types.h> +#ifdef __linux__ /* REALLY SORRY! */ +#define CANBLOCKSIZE 1 #include <sys/vfs.h> +#elif defined(__FreeBSD__) +#define CANBLOCKSIZE 1 +#include <sys/param.h> +#include <sys/mount.h> #endif #include "stdinc.h" #include <ctype.h> @@ -137,7 +143,7 @@ initpart(char *name, int mode) if(hi == 0) hi = dir->length; part->size = hi - part->offset; -#ifdef _LIBC_H_ +#ifdef CANBLOCKSIZE { struct statfs sfs; if(fstatfs(part->fd, &sfs) >= 0)