--- etc/afpd/afs.c.orig	Sat Jul 20 05:20:56 1996
+++ etc/afpd/afs.c	Thu Nov 11 15:08:21 1999
@@ -12,14 +12,16 @@
 #include <afs/venus.h>
 #include <afs/afsint.h>
 #include <atalk/afp.h>
+#include <string.h>
 #include <unistd.h>
 
 #include "directory.h"
 #include "volume.h"
 
+int
 afs_getvolspace( vol, bfree, btotal )
     struct vol	*vol;
-    u_long	*bfree, *btotal;
+    u_int32_t	*bfree, *btotal;
 {
     struct ViceIoctl	vi;
     struct VolumeStatus	*vs;
@@ -58,6 +60,7 @@
     return( AFP_OK );
 }
 
+int
 afp_getdiracl( ibuf, ibuflen, rbuf, rbuflen )
     char	*ibuf, *rbuf;
     int		ibuflen, *rbuflen;
@@ -70,14 +73,14 @@
     short		vid;
 
     ibuf += 2;
-    bcopy( ibuf, &vid, sizeof( short ));
+    memcpy( &vid, ibuf, sizeof( short ));
     ibuf += sizeof( short );
     if (( vol = getvolbyvid( vid )) == NULL ) {
 	*rbuflen = 0;
 	return( AFPERR_PARAM );
     }
 
-    bcopy( ibuf, &did, sizeof( int ));
+    memcpy( &did, ibuf, sizeof( int ));
     ibuf += sizeof( int );
     if (( dir = dirsearch( vol, did )) == NULL ) {
 	*rbuflen = 0;
@@ -176,14 +179,14 @@
     *rbuflen = 0;
     iend = ibuf + ibuflen;
     ibuf += 2;
-    bcopy( ibuf, &vid, sizeof( short ));
+    memcpy( &vid, ibuf, sizeof( short ));
     ibuf += sizeof( short );
     if (( vol = getvolbyvid( vid )) == NULL ) {
 	*rbuflen = 0;
 	return( AFPERR_PARAM );
     }
 
-    bcopy( ibuf, &did, sizeof( int ));
+    memcpy( &did, ibuf, sizeof( int ));
     ibuf += sizeof( int );
     if (( dir = dirsearch( vol, did )) == NULL ) {
 	*rbuflen = 0;
@@ -262,7 +265,7 @@
     }
     ibuf += len;
 
-    bcopy( ibuf, &clen, sizeof( short ));
+    memcpy( &clen, ibuf, sizeof( short ));
     clen = ntohs( clen );
     if ( clen % 8 != 0 ) {
 	return( AFPERR_PARAM );
@@ -276,8 +279,8 @@
     if ( len > 8 ) {
 	return( AFPERR_PARAM );
     }
-    bzero( oldpw, sizeof( oldpw ));
-    bcopy( ibuf, oldpw, len );
+    memset( oldpw, 0, sizeof( oldpw ));
+    memcpy( oldpw, ibuf, len );
     ibuf += len;
     oldpw[ len ] = '\0';
 
@@ -285,8 +288,8 @@
     if ( len > 8 ) {
 	return( AFPERR_PARAM );
     }
-    bzero( newpw, sizeof( newpw ));
-    bcopy( ibuf, newpw, len );
+    memset( newpw, 0, sizeof( newpw ));
+    memcpy( newpw, ibuf, len );
     ibuf += len;
     newpw[ len ] = '\0';
 
@@ -294,30 +297,30 @@
 	"changing password for <%s>.<%s>@<%s>", name, instance, realm );
 
     ka_StringToKey( oldpw, realm, &oldkey );
-    bzero( oldpw, sizeof( oldpw ));
+    memset( oldpw, 0, sizeof( oldpw ));
     ka_StringToKey( newpw, realm, &newkey );
-    bzero( newpw, sizeof( newpw ));
+    memset( newpw, 0, sizeof( newpw ));
 
     rc = ka_GetAdminToken( name, instance, realm, &oldkey, 60, &adtok, 0 );
-    bzero( &oldkey, sizeof( oldkey ));
+    memset( &oldkey, 0, sizeof( oldkey ));
     switch ( rc ) {
 	case 0:
 	    break;
 	case KABADREQUEST:
-	    bzero( &newkey, sizeof( newkey ));
+	    memset( &newkey, 0, sizeof( newkey ));
 	    return( AFPERR_NOTAUTH );
 	default:
-	    bzero( &newkey, sizeof( newkey ));
+	    memset( &newkey, 0, sizeof( newkey ));
 	    return( AFPERR_BADUAM );
     }
     if ( ka_AuthServerConn( realm, KA_MAINTENANCE_SERVICE, &adtok, &conn )
 		!= 0 ) {
-	bzero( &newkey, sizeof( newkey ));
+	memset( &newkey, 0, sizeof( newkey ));
 	return( AFPERR_BADUAM );
     }
 
     rc = ka_ChangePassword( name, instance, conn, 0, &newkey );
-    bzero( &newkey, sizeof( newkey ));
+    memset( &newkey, 0, sizeof( newkey ));
     if ( rc != 0 ) {
 	return( AFPERR_BADUAM );
     }
