libdiskfs: work around OS X linker brain-damage

This commit is contained in:
Russ Cox 2007-11-05 16:37:29 -05:00
parent 760f2fb6a9
commit 6519f89515
2 changed files with 4 additions and 0 deletions

View file

@ -3,6 +3,7 @@
#include <diskfs.h>
int nfilereads;
void _nfilereads_darwin_sucks(void) { }
typedef struct DiskFile DiskFile;
struct DiskFile

View file

@ -14,6 +14,7 @@ struct DiskVenti
};
extern int nfilereads;
extern void _nfilereads_darwin_sucks(void);
/*
* This part is like file.c but doesn't require storing the root block
@ -155,6 +156,8 @@ diskopenventi(VtCache *c, uchar score[VtScoreSize])
Err:
if(b)
vtblockput(b);
_nfilereads_darwin_sucks(); /* force Darwin ld to pull in file.o */
return nil;
}