From 2d2ac3ca5fbd221d297861c0b5c409e9e004545c Mon Sep 17 00:00:00 2001 From: Antoine Verheijen Date: Wed, 1 Dec 2010 13:22:45 -0700 Subject: [PATCH] OpenBSD: Use Darwin version of afsi_SetServerIPRank() for OpenBSD 4.7 and above. With OpenBSD 4.7, the ia_subnet and ia_subnetmask fields have been removed from the in_ifaddr structure as part of a cleanup that considers them unnecessary. Thus, the version of afsi_SetServerIPRank() that OpenBSD was using no longer compiles. On the other hand, the Darwin version of this routine seems suited to OpenBSD's needs since it doesn't use those fields so we'll use that version for OpenBSD 4.7 and above instead. Change-Id: I27333056378a023e175bddeb637288fc6d1b6e88 Reviewed-on: http://gerrit.openafs.org/3405 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/afs_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/afs/afs_server.c b/src/afs/afs_server.c index 001704979..604342521 100644 --- a/src/afs/afs_server.c +++ b/src/afs/afs_server.c @@ -1199,7 +1199,7 @@ afsi_SetServerIPRank(struct srvAddr *sa, afs_int32 addr, return; } #else /* AFS_USERSPACE_IP_ADDR */ -#if (! defined(AFS_SUN5_ENV)) && !defined(AFS_DARWIN_ENV) && defined(USEIFADDR) +#if (! defined(AFS_SUN5_ENV)) && (! defined(AFS_DARWIN_ENV)) && (! defined(AFS_OBSD47_ENV)) && defined(USEIFADDR) void afsi_SetServerIPRank(struct srvAddr *sa, struct in_ifaddr *ifa) { @@ -1236,7 +1236,7 @@ afsi_SetServerIPRank(struct srvAddr *sa, struct in_ifaddr *ifa) #endif /* IFF_POINTTOPOINT */ } #endif /*(!defined(AFS_SUN5_ENV)) && defined(USEIFADDR) */ -#if defined(AFS_DARWIN_ENV) && defined(USEIFADDR) +#if (defined(AFS_DARWIN_ENV) || defined(AFS_OBSD47_ENV)) && defined(USEIFADDR) #ifndef afs_min #define afs_min(A,B) ((A)<(B)) ? (A) : (B) #endif -- 2.39.5