$NetBSD: patch-at,v 1.1 1999/11/25 01:50:45 hubertf Exp $ diff -x *.orig -urN ./lib/zephyr/Zinternal.c /usr/pkgsrc/net/zephyr/work.i386.unpatched/zephyr-2.0.4/lib/zephyr/Zinternal.c --- ./lib/zephyr/Zinternal.c Tue Jul 18 22:28:17 1995 +++ /usr/pkgsrc/net/zephyr/work.i386.unpatched/zephyr-2.0.4/lib/zephyr/Zinternal.c Thu Nov 25 02:52:54 1999 @@ -608,6 +608,7 @@ Code_t retval; static char version[BUFSIZ]; /* default init should be all \0 */ struct sockaddr_in name; + struct timeval tv; int namelen = sizeof(name); if (!notice->z_sender) @@ -627,9 +628,9 @@ notice->z_multinotice = ""; - (void) gettimeofday(¬ice->z_uid.tv, (struct timezone *)0); - notice->z_uid.tv.tv_sec = htonl((u_long) notice->z_uid.tv.tv_sec); - notice->z_uid.tv.tv_usec = htonl((u_long) notice->z_uid.tv.tv_usec); + (void) gettimeofday(&tv, (struct timezone *)0); + notice->z_uid.zuid_sec = htonl((u_long) tv.tv_sec); + notice->z_uid.zuid_usec = htonl((u_long) tv.tv_usec); if ((retval = Z_GetMyAddr()) != ZERR_NONE) return (retval); @@ -709,8 +710,8 @@ return (ZERR_HEADERLEN); ptr += strlen(ptr)+1; - if (ZMakeAscii(ptr, end-ptr, (unsigned char *)¬ice->z_uid, - sizeof(ZUnique_Id_t)) == ZERR_FIELDLEN) + if (ZMakeAscii(ptr, end-ptr, (unsigned char *)¬ice->z_uid, + sizeof(notice->z_uid)) == ZERR_FIELDLEN) return (ZERR_HEADERLEN); ptr += strlen(ptr)+1; @@ -760,8 +761,8 @@ if (Z_AddField(&ptr, notice->z_multinotice, end)) return (ZERR_HEADERLEN); - if (ZMakeAscii(ptr, end-ptr, (unsigned char *)¬ice->z_multiuid, - sizeof(ZUnique_Id_t)) == ZERR_FIELDLEN) + if (ZMakeAscii(ptr, end-ptr, (unsigned char *)¬ice->z_multiuid, + sizeof(notice->z_multiuid)) == ZERR_FIELDLEN) return (ZERR_HEADERLEN); ptr += strlen(ptr)+1; @@ -881,6 +882,7 @@ char multi[64]; int offset, hdrsize, fragsize, ret_len, message_len, waitforack; Code_t retval; + struct timeval tv; hdrsize = len-notice->z_message_len; fragsize = Z_MAXPKTLEN-hdrsize-Z_FRAGFUDGE; @@ -896,12 +898,9 @@ (void) sprintf(multi, "%d/%d", offset, notice->z_message_len); partnotice.z_multinotice = multi; if (offset > 0) { - (void) gettimeofday(&partnotice.z_uid.tv, - (struct timezone *)0); - partnotice.z_uid.tv.tv_sec = - htonl((u_long) partnotice.z_uid.tv.tv_sec); - partnotice.z_uid.tv.tv_usec = - htonl((u_long) partnotice.z_uid.tv.tv_usec); + (void) gettimeofday(&tv, (struct timezone *)0); + partnotice.z_uid.zuid_sec = htonl((u_long) tv.tv_sec); + partnotice.z_uid.zuid_usec = htonl((u_long) tv.tv_usec); if ((retval = Z_GetMyAddr()) != ZERR_NONE) return (retval); (void) memcpy((char *)&partnotice.z_uid.zuid_addr, __My_addr,