diff -Naur procps-3.2.1/proc/devname.c procps-3.2.1-patched/proc/devname.c
--- procps-3.2.1/proc/devname.c 2004-03-17 13:43:50.000000000 -0500
+++ procps-3.2.1-patched/proc/devname.c 2006-12-13 11:38:10.366938000 -0500
@@ -19,10 +19,10 @@
 #include "version.h"
 #include "devname.h"

-#include <asm/page.h>
-#ifndef PAGE_SIZE
-#define PAGE_SIZE (sizeof(long)*1024)
-#endif
+// This is the buffer size for a tty name. Any path is legal,
+// which makes PAGE_SIZE appropriate (see kernel source), but
+// that is only 99% portable and utmp only holds 32 anyway.
+#define TTY_NAME_SIZE 128

 /* Who uses what:
  *
@@ -216,7 +216,7 @@
   char path[32];
   int count;
   sprintf(path, "/proc/%d/%s", pid, name);  /* often permission denied */
-  count = readlink(path,buf,PAGE_SIZE-1);
+  count = readlink(path,buf,TTY_NAME_SIZE-1);
   if(count == -1) return 0;
   buf[count] = '\0';
   if(stat(buf, &sbuf) < 0) return 0;
@@ -227,7 +227,7 @@

 /* number --> name */
 unsigned dev_to_tty(char *restrict ret, unsigned chop, dev_t dev_t_dev, int pid, unsigned int flags) {
-  static char buf[PAGE_SIZE];
+  static char buf[TTY_NAME_SIZE];
   char *restrict tmp = buf;
   unsigned dev = dev_t_dev;
   unsigned i = 0;

