freebsd-almost-working-client-20020216
[openafs.git] / src / rx / rx_kcommon.c
index b888d8f..da117bd 100644 (file)
@@ -766,6 +766,9 @@ struct osi_socket *rxk_NewSocket(short aport)
     myaddr.sin_family = AF_INET;
     myaddr.sin_port = aport;
     myaddr.sin_addr.s_addr = 0;
+#ifdef STRUCT_SOCKADDR_HAS_SA_LEN
+    myaddr.sin_len = sizeof(myaddr);
+#endif
 
 #ifdef AFS_HPUX110_ENV
     bindnam = allocb_wait((addrsize+SO_MSGOFFSET+1), BPRI_MED);
@@ -792,7 +795,6 @@ struct osi_socket *rxk_NewSocket(short aport)
            osi_Panic("osi_NewSocket: last attempt to reserve 32K failed!\n");
     }
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
-    myaddr.sin_len = sizeof(myaddr);
 #if defined(AFS_XBSD_ENV)
     code = sobind(newSocket, (struct sockaddr *)&myaddr, curproc);
 #else
@@ -1025,7 +1027,10 @@ void rxk_Listener(void)
 #ifdef AFS_SUN5_ENV
     rxk_ListenerPid = curproc->p_pid;
 #endif /* AFS_SUN5_ENV */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#ifdef AFS_FBSD_ENV
+    rxk_ListenerPid = curproc->p_pid;
+#endif /* AFS_SUN5_ENV */
+#if defined(AFS_DARWIN_ENV)
     rxk_ListenerPid = current_proc()->p_pid;
 #endif
 #if defined(RX_ENABLE_LOCKS) && !defined(AFS_SUN5_ENV)