aboutsummaryrefslogtreecommitdiff
path: root/src/libdiskfs
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2007-11-05 16:37:29 -0500
committerRuss Cox <rsc@swtch.com>2007-11-05 16:37:29 -0500
commit6519f89515fdc8a30ff45209a9f25bf2992707de (patch)
treee60ef5ce6f68a284b9b6d2d9f06c1651354b0e17 /src/libdiskfs
parent760f2fb6a9d0ce3b3deffae2ddcd799a9347337c (diff)
downloadplan9port-6519f89515fdc8a30ff45209a9f25bf2992707de.tar.gz
plan9port-6519f89515fdc8a30ff45209a9f25bf2992707de.tar.bz2
plan9port-6519f89515fdc8a30ff45209a9f25bf2992707de.zip
libdiskfs: work around OS X linker brain-damage
Diffstat (limited to 'src/libdiskfs')
-rw-r--r--src/libdiskfs/file.c1
-rw-r--r--src/libdiskfs/venti.c3
2 files changed, 4 insertions, 0 deletions
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 <diskfs.h>
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;
}