(struct sockaddr *) addr, addrlen)) == -1) { err = _MD_ERRNO();
(struct sockaddr *) &addrCopy, addrlen)) == -1) { #else while ((rv = sendto(osfd, buf, amount, flags, (struct sockaddr *) addr, addrlen)) == -1) { #endif err = _MD_ERRNO();
_MD_sendto (PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,            const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout){    PRInt32 osfd = fd->secret->md.osfd;    PRInt32 rv, err;    PRThread *me = _PR_MD_CURRENT_THREAD();    while ((rv = sendto(osfd, buf, amount, flags,			(struct sockaddr *) addr, addrlen)) == -1) {	err = _MD_ERRNO();	if ((err == EAGAIN) || (err == EWOULDBLOCK))	{	    if (fd->secret->nonblocking) {		break;	    }#ifdef BONE_VERSION	    if ((rv = socket_io_wait(osfd, WRITE_FD, timeout))< 0)		goto done;  #endif	} else if ((err == EINTR) && (!_PR_PENDING_INTERRUPT(me))) {	    continue;	} else {	    break;	}    }    if (rv < 0) {	_PR_MD_MAP_SENDTO_ERROR(err);    }#ifdef BONE_VERSIONdone:#endif    return(rv);}