ca76526b11
if it exists.
60 lines
1.4 KiB
Plaintext
60 lines
1.4 KiB
Plaintext
--- libatalk/asp/asp_write.c.orig Sat Sep 28 01:30:39 1996
|
|
+++ libatalk/asp/asp_write.c Thu Nov 18 16:01:57 1999
|
|
@@ -21,6 +21,7 @@
|
|
* netatalk@itd.umich.edu
|
|
*/
|
|
|
|
+#include <string.h>
|
|
#include <sys/types.h>
|
|
#include <sys/time.h>
|
|
#include <sys/uio.h>
|
|
@@ -41,6 +42,7 @@
|
|
{ rbuf[ 7 ], 0 },
|
|
};
|
|
|
|
+int
|
|
asp_wrtcont( asp, buf, buflen )
|
|
ASP asp;
|
|
char *buf;
|
|
@@ -49,18 +51,18 @@
|
|
struct atp_block atpb;
|
|
char *p;
|
|
int iovcnt = 8;
|
|
- u_short blen, seq;
|
|
- u_char oport;
|
|
+ u_int16_t blen, seq;
|
|
+ u_int8_t oport;
|
|
|
|
p = buf;
|
|
*p++ = ASPFUNC_WRTCONT;
|
|
*p++ = asp->asp_sid;
|
|
seq = htons( asp->asp_seq );
|
|
- bcopy( &seq, p, sizeof( u_short ));
|
|
- p += sizeof( u_short );
|
|
+ memcpy( p, &seq, sizeof( seq ));
|
|
+ p += sizeof( seq );
|
|
blen = htons( *buflen );
|
|
- bcopy( &blen, p, sizeof( u_short ));
|
|
- p += sizeof( u_short );
|
|
+ memcpy( p, &blen, sizeof( blen ));
|
|
+ p += sizeof( blen );
|
|
|
|
for ( iovcnt = 0; iovcnt < 8; iovcnt++ ) {
|
|
iov[ iovcnt ].iov_len = ATP_MAXDATA;
|
|
@@ -89,13 +91,14 @@
|
|
|
|
p = buf;
|
|
for ( iovcnt = 0; iovcnt < atpb.atp_rresiovcnt; iovcnt++ ) {
|
|
- bcopy( iov[ iovcnt ].iov_base + 4, p, iov[ iovcnt ].iov_len - 4 );
|
|
+ memcpy( p, iov[ iovcnt ].iov_base + 4, iov[ iovcnt ].iov_len - 4 );
|
|
p += ( iov[ iovcnt ].iov_len - 4 );
|
|
}
|
|
*buflen = p - buf;
|
|
return( 0 );
|
|
}
|
|
|
|
+int
|
|
asp_wrtreply( asp, result, buf, buflen )
|
|
ASP asp;
|
|
int result;
|