$NetBSD: patch-aa,v 1.1.1.1 2005/01/24 15:07:35 jmcneill Exp $ --- radeontool.c.orig 2005-01-24 10:39:22.000000000 -0400 +++ radeontool.c 2005-01-24 10:41:49.000000000 -0400 @@ -21,7 +21,12 @@ #include #include #include +#ifdef __NetBSD__ +#include +#include +#else #include +#endif #include "radeon_reg.h" @@ -251,7 +256,6 @@ } else if(forkrc == 0) { /* if child */ close(pipefd[0]); dup2(pipefd[1],1); /* stdout */ - setenv("PATH","/sbin:/usr/sbin:/bin:/usr/bin",1); execlp("lspci","lspci","-v",NULL); fatal("exec lspci failure\n"); } @@ -307,7 +311,13 @@ } if(debug) printf("%s",line); - if(strstr(line,"emory") && strstr(line,"K")) { /* if line contains a "Memory" and "K" string */ + if(strstr(line,"emory") && +#ifdef __NetBSD__ + strstr(line,"non-prefetch")) +#else + strstr(line,"K")) +#endif + { /* if line contains a "Memory" and "K" string */ break; } };