--- libatalk/adouble/ad_flush.c.orig	Tue May 14 02:44:47 1996
+++ libatalk/adouble/ad_flush.c	Wed Nov 10 15:17:47 1999
@@ -28,15 +28,17 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <string.h>
 
 extern int		errno;
 
+int
 ad_flush( ad, adflags )
     struct adouble	*ad;
     int			adflags;
 {
-    int			eid;
-    short		nent;
+    int32_t		eid;
+    int16_t		nent;
     char		*buf, *nentp;
 
     if (( adflags & ADFLAGS_HF ) &&
@@ -46,16 +48,16 @@
 	 */
 	buf = ad->ad_data;
 	ad->ad_magic = htonl( ad->ad_magic );
-	bcopy( (char *)&ad->ad_magic, buf, sizeof( ad->ad_magic ));
+	memcpy( buf, (char *)&ad->ad_magic, sizeof( ad->ad_magic ));
 	ad->ad_magic = ntohl( ad->ad_magic );
 	buf += sizeof( ad->ad_magic );
 
 	ad->ad_version = htonl( ad->ad_version );
-	bcopy( (char *)&ad->ad_version, buf, sizeof( ad->ad_version ));
+	memcpy( buf, (char *)&ad->ad_version, sizeof( ad->ad_version ));
 	ad->ad_version = ntohl( ad->ad_version );
 	buf += sizeof( ad->ad_version );
 
-	bcopy( ad->ad_homefs, buf, sizeof( ad->ad_homefs ));
+	memcpy( buf, ad->ad_homefs, sizeof( ad->ad_homefs ));
 	buf += sizeof( ad->ad_homefs );
 	nentp = buf;
 	buf += sizeof( nent );
@@ -65,23 +67,23 @@
 		continue;
 	    }
 	    eid = htonl( eid );
-	    bcopy( (char *)&eid, buf, sizeof( eid ));
+	    memcpy( buf, (char *)&eid, sizeof( eid ));
 	    eid = ntohl( eid );
 	    buf += sizeof( eid );
 	    ad->ad_eid[ eid ].ade_off = htonl( ad->ad_eid[ eid ].ade_off );
-	    bcopy( (char *)&ad->ad_eid[ eid ].ade_off, buf,
+	    memcpy( buf, (char *)&ad->ad_eid[ eid ].ade_off,
 		    sizeof( ad->ad_eid[ eid ].ade_off ));
 	    ad->ad_eid[ eid ].ade_off = ntohl( ad->ad_eid[ eid ].ade_off );
 	    buf += sizeof( ad->ad_eid[ eid ].ade_off );
 	    ad->ad_eid[ eid ].ade_len = htonl( ad->ad_eid[ eid ].ade_len );
-	    bcopy( (char *)&ad->ad_eid[ eid ].ade_len, buf,
+	    memcpy( buf, (char *)&ad->ad_eid[ eid ].ade_len,
 		    sizeof( ad->ad_eid[ eid ].ade_len ));
 	    ad->ad_eid[ eid ].ade_len = ntohl( ad->ad_eid[ eid ].ade_len );
 	    buf += sizeof( ad->ad_eid[ eid ].ade_len );
 	    nent++;
 	}
 	nent = htons( nent );
-	bcopy( (char *)&nent, nentp, sizeof( nent ));
+	memcpy( nentp, (char *)&nent, sizeof( nent ));
 
 	if ( ad->ad_hf.adf_off != 0 ) {
 	    if ( lseek( ad->ad_hf.adf_fd, 0L, SEEK_SET ) < 0L ) {
@@ -101,6 +103,7 @@
     return( 0 );
 }
 
+int
 ad_close( ad, adflags )
     struct adouble	*ad;
     int			adflags;
