$NetBSD: patch-ab,v 1.2 2000/12/14 02:40:20 wiz Exp $ --- iozone.c.orig Tue Sep 14 23:38:16 1999 +++ iozone.c @@ -908,10 +908,10 @@ case 'M': /* Report machine name and OS */ pi=popen("uname -a", "r"); fread(reply,99,1,pi); - m=reply; - while(*m!='\n') /* Strip after new line */ - m++; - *m=0; + reply[98] = '\0'; + m=strchr(reply, '\n'); /* Strip after new line */ + if (m != NULL) + *m=0; printf("\n\tMachine = %s\n",reply); pclose(pi); break; @@ -6130,7 +6130,11 @@ #endif exit(119); } +#ifndef __NetBSD__ addr = (char *)shmat(shmid, 0, SHM_W); +#else + addr = (char *)shmat(shmid, 0, 0); +#endif #ifdef __LP64__ if((long long)addr == (long long)-1) #else