From f49f7996fcf9952f09fa85cd1af1e45fcd8aac60 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Fri, 10 Aug 2007 05:13:04 +0000 Subject: [PATCH] DEVEL15-viced-cleanup-head-20070810 fix demand attach rwlock code on macos, fix host tracking code everywhere only applies to head and 1.5 (cherry picked from commit 493cad12aa00c321ad125118a9bd9b037a651863) --- src/viced/host.c | 4 ++-- src/viced/viced.c | 5 +++++ src/vol/volume.c | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/viced/host.c b/src/viced/host.c index 58b94ac62..ee30ae07a 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -2630,7 +2630,7 @@ h_stateVerifyAddrHash(struct fs_dump_state * state, struct host * h, afs_uint32 { int ret = 0, found = 0; struct host *host = NULL; - struct h_hashChain *chain; + struct h_AddrHashChain *chain; int index = h_HashIndex(addr); char tmp[16]; int chain_len = 0; @@ -2682,7 +2682,7 @@ h_stateVerifyUuidHash(struct fs_dump_state * state, struct host * h) { int ret = 0, found = 0; struct host *host = NULL; - struct h_hashChain *chain; + struct h_UuidHashChain *chain; afsUUID * uuidp = &h->interface->uuid; int index = h_UuidHashIndex(uuidp); char tmp[40]; diff --git a/src/viced/viced.c b/src/viced/viced.c index a27043d6f..d09d80137 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -229,6 +229,11 @@ static void FlagMsg(); * certain background threads before we are allowed to dump state to * disk */ + +#if !defined(PTHREAD_RWLOCK_INITIALIZER) && defined(AFS_DARWIN80_ENV) +#define PTHREAD_RWLOCK_INITIALIZER {0x2DA8B3B4, {0}} +#endif + struct fs_state fs_state = { FS_MODE_NORMAL, 0, diff --git a/src/vol/volume.c b/src/vol/volume.c index 91ede86e9..bf1668520 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -5997,7 +5997,7 @@ DoubleToPrintable(double x, char * buf, int len) return buf; } -static void +void VPrintExtendedCacheStats_r(int flags) { int i, j; -- 2.39.5