From: Antoine Verheijen Date: Wed, 1 Dec 2010 20:22:45 +0000 (-0700) Subject: OpenBSD: Use Darwin version of afsi_SetServerIPRank() for OpenBSD 4.7 and above. X-Git-Tag: openafs-stable-1_6_0pre1~26 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3141167ad1d360e2da4c26225f86e3ad0789bd85;p=packages%2Fo%2Fopenafs.git 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. Reviewed-on: http://gerrit.openafs.org/3405 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 2d2ac3ca5fbd221d297861c0b5c409e9e004545c) Change-Id: I60c8aeb69484c87b10cdda8a317702d2f80ee849 Reviewed-on: http://gerrit.openafs.org/3453 --- diff --git a/src/afs/afs_server.c b/src/afs/afs_server.c index bd423dcc3..3e461e1f6 100644 --- a/src/afs/afs_server.c +++ b/src/afs/afs_server.c @@ -1191,7 +1191,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) { @@ -1228,7 +1228,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