$NetBSD: patch-ap,v 1.2 2001/02/21 18:50:37 tv Exp $ --- ifcico/hydra.c.orig Sun Nov 15 15:13:14 1998 +++ ifcico/hydra.c Wed Feb 21 10:51:23 2001 @@ -89,7 +89,7 @@ static char *put_long(char *buffer, long val) { -#if defined(__i386__) +#if defined(__i386__) || (defined(__NetBSD__) && (BYTE_ORDER == LITTLE_ENDIAN)) *(unsigned long *) buffer = (unsigned long) val; #else buffer[0] = (unsigned long) val & 0xff; @@ -104,7 +104,7 @@ static long get_long(char *buffer) { -#if defined(__i386__) +#if defined(__i386__) || (defined(__NetBSD__) && (BYTE_ORDER == LITTLE_ENDIAN)) return *(long *) buffer; #else return ((unsigned long) ((unsigned char) buffer[0])) | @@ -530,8 +530,8 @@ char *inbuf, *outbuf; int rxlen, txlen; /* length of receive/transmit buffer */ long txwindow, rxwindow; /* window sizes */ - long txpos, rxpos; /* file positions */ - long stxpos, srxpos; + off_t txpos, rxpos; /* file positions */ + off_t stxpos, srxpos; long longnum; int hdxlink = 0; int txretries, rxretries; @@ -894,8 +894,8 @@ if (to_send) { txlen = sprintf(txbuf, "%08lx%08lx%08lx%08lx%08lx", - mtime2sl(txstat.st_mtime), - txstat.st_size, + (unsigned long)mtime2sl(txstat.st_mtime), + (unsigned long)txstat.st_size, 0UL, 0UL, 0UL); @@ -1353,7 +1353,7 @@ */ else if ((rxlen > 41) && (rxbuf[rxlen - 1] == 0)) { - time_t timestamp; + long timestamp; long filesize; char dosname[8 + 1 + 3 + 1], *name;