]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
OpenBSD: Use Darwin version of afsi_SetServerIPRank() for OpenBSD 4.7 and above.
authorAntoine Verheijen <antoine@ualberta.ca>
Wed, 1 Dec 2010 20:22:45 +0000 (13:22 -0700)
committerDerrick Brashear <shadow@dementia.org>
Tue, 7 Dec 2010 02:23:26 +0000 (18:23 -0800)
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 <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 2d2ac3ca5fbd221d297861c0b5c409e9e004545c)
Change-Id: I60c8aeb69484c87b10cdda8a317702d2f80ee849
Reviewed-on: http://gerrit.openafs.org/3453

src/afs/afs_server.c

index bd423dcc3a8030d76bec015dba243d172ccf15ab..3e461e1f6547b96ee036da4e4c96889a9a5b2641 100644 (file)
@@ -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