mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
fix freebsd
This commit is contained in:
parent
48458cb2b1
commit
0613fe4b84
1 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,13 @@
|
||||||
#ifdef PLAN9PORT /* SORRY! */
|
#ifdef PLAN9PORT /* SORRY! */
|
||||||
#include <u.h>
|
#include <u.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#ifdef __linux__ /* REALLY SORRY! */
|
||||||
|
#define CANBLOCKSIZE 1
|
||||||
#include <sys/vfs.h>
|
#include <sys/vfs.h>
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
#define CANBLOCKSIZE 1
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <sys/mount.h>
|
||||||
#endif
|
#endif
|
||||||
#include "stdinc.h"
|
#include "stdinc.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -137,7 +143,7 @@ initpart(char *name, int mode)
|
||||||
if(hi == 0)
|
if(hi == 0)
|
||||||
hi = dir->length;
|
hi = dir->length;
|
||||||
part->size = hi - part->offset;
|
part->size = hi - part->offset;
|
||||||
#ifdef _LIBC_H_
|
#ifdef CANBLOCKSIZE
|
||||||
{
|
{
|
||||||
struct statfs sfs;
|
struct statfs sfs;
|
||||||
if(fstatfs(part->fd, &sfs) >= 0)
|
if(fstatfs(part->fd, &sfs) >= 0)
|
||||||
|
|
Loading…
Reference in a new issue