libdiskfs: work around OS X linker brain-damage
This commit is contained in:
parent
760f2fb6a9
commit
6519f89515
2 changed files with 4 additions and 0 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <diskfs.h>
|
||||
|
||||
int nfilereads;
|
||||
void _nfilereads_darwin_sucks(void) { }
|
||||
|
||||
typedef struct DiskFile DiskFile;
|
||||
struct DiskFile
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue