--- libatalk/nbp/nbp_rgstr.c.orig Wed Oct 8 07:22:14 1997 +++ libatalk/nbp/nbp_rgstr.c Wed Nov 10 14:24:44 1999 @@ -3,13 +3,14 @@ * All Rights Reserved. See COPYRIGHT. */ +#include +#include #include #include #include #include #include #include -#include #include #include @@ -19,6 +20,7 @@ #include "nbp_conf.h" +int nbp_rgstr( sat, obj, type, zone ) struct sockaddr_at *sat; char *obj, *type, *zone; @@ -47,19 +49,19 @@ nh.nh_op = NBPOP_RGSTR; nh.nh_cnt = 1; nh.nh_id = 0; - bcopy( &nh, data, SZ_NBPHDR ); + memcpy( data, &nh, SZ_NBPHDR ); data += SZ_NBPHDR; nt.nt_net = sat->sat_addr.s_net; nt.nt_node = sat->sat_addr.s_node; nt.nt_port = sat->sat_port; - bcopy( &nt, data, SZ_NBPTUPLE); + memcpy( data, &nt, SZ_NBPTUPLE); data += SZ_NBPTUPLE; if ( obj ) { if (( cc = strlen( obj )) > NBPSTRLEN ) return( -1 ); *data++ = cc; - bcopy( obj, data, cc ); + memcpy( data, obj, cc ); data += cc; } else { *data++ = 0; @@ -68,7 +70,7 @@ if ( type ) { if (( cc = strlen( type )) > NBPSTRLEN ) return( -1 ); *data++ = cc; - bcopy( type, data, cc ); + memcpy( data, type, cc ); data += cc; } else { *data++ = 0; @@ -77,13 +79,13 @@ if ( zone ) { if (( cc = strlen( zone )) > NBPSTRLEN ) return( -1 ); *data++ = cc; - bcopy( zone, data, cc ); + memcpy( data, zone, cc ); data += cc; } else { *data++ = 0; } - bzero( (struct sockaddr *) &to, sizeof( struct sockaddr_at )); + memset( (struct sockaddr *) &to, 0, sizeof( struct sockaddr_at )); #ifdef BSD4_4 to.sat_len = sizeof( struct sockaddr_at ); #endif BSD4_4 @@ -127,7 +129,7 @@ if ( *data++ != DDPTYPE_NBP ) { return( -1 ); } - bcopy( data, &nh, SZ_NBPHDR ); + memcpy( &nh, data, SZ_NBPHDR ); if ( nh.nh_op != NBPOP_OK ) { return( -1 ); }