From 6519f89515fdc8a30ff45209a9f25bf2992707de Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 5 Nov 2007 16:37:29 -0500 Subject: libdiskfs: work around OS X linker brain-damage --- src/libdiskfs/file.c | 1 + src/libdiskfs/venti.c | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/libdiskfs/file.c b/src/libdiskfs/file.c index d829578e..834c1acc 100644 --- a/src/libdiskfs/file.c +++ b/src/libdiskfs/file.c @@ -3,6 +3,7 @@ #include int nfilereads; +void _nfilereads_darwin_sucks(void) { } typedef struct DiskFile DiskFile; struct DiskFile diff --git a/src/libdiskfs/venti.c b/src/libdiskfs/venti.c index f0e8a841..4830439c 100644 --- a/src/libdiskfs/venti.c +++ b/src/libdiskfs/venti.c @@ -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; } -- cgit v1.2.3