[OpenAFS] 1.5.19 build fails on SunOS 5.11 snv62 SPARC

Chaskiel M Grundman cg2v@andrew.cmu.edu
Mon, 30 Apr 2007 14:10:09 -0400


>> 1252 is:
>>    for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx,
>>    ill)) {
>>
>> This isn't our macro, so I gotta assume it changed.

Here's my untested suggestion (still lacks autoconf glue, may require an 
#include <sys/netstack.h>):

Index: src/afs/afs_server.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_server.c,v
retrieving revision 1.33.2.8
diff -u -d -r1.33.2.8 afs_server.c
--- src/afs/afs_server.c        10 Nov 2006 00:16:29 -0000      1.33.2.8
+++ src/afs/afs_server.c        30 Apr 2007 18:07:44 -0000
@@ -1241,6 +1241,8 @@
 #else
     extern struct ill_s *ill_g_headp;
     long *addr = (long *)ill_g_headp;
+    netstack_t *ns =  netstack_find_by_stackid(GLOBAL_NETSTACKID)
+    ip_stack_t *ipst = ns->netstack_ip;
 #endif
     ill_t *ill;
     ipif_t *ipif;
@@ -1249,7 +1251,7 @@
     if (sa)
          sa->sa_iprank = 0;
 #ifdef AFS_SUN510_ENV
-    for (ill = ILL_START_WALK_ALL(&ctx) ; ill ; ill = ill_next(&ctx, ill)) 
{
+    for (ill = ILL_START_WALK_ALL(&ctx, ipst) ; ill ; ill = ill_next(&ctx, 
ill)) {
 #else
     for (ill = (struct ill_s *)*addr /*ill_g_headp */ ; ill;
         ill = ill->ill_next) {
@@ -1313,6 +1315,9 @@
            }
        }
     }
+#ifdef AFS_SUN510_ENV
+    netstack_rele(ns);
+#endif
 #else
 #ifndef USEIFADDR
     struct ifnet *ifn = NULL;