diff -Naurp powerman-1.0.32.orig/src/client.c powerman-1.0.32/src/client.c
--- powerman-1.0.32.orig/src/client.c 2006-04-26 20:17:33.000000000 -0400
+++ powerman-1.0.32/src/client.c 2008-02-13 13:25:56.000000000 -0500
@@ -31,6 +31,7 @@
#include <syslog.h>
#include <stdarg.h>
#include <stdlib.h>
+#include <limits.h>
#include <arpa/inet.h>
#include <tcpd.h>
diff -Naurp powerman-1.0.32.orig/src/parse.y powerman-1.0.32/src/parse.y
--- powerman-1.0.32.orig/src/parse.y 2006-11-14 16:29:53.000000000 -0500
+++ powerman-1.0.32/src/parse.y 2008-02-13 13:29:37.000000000 -0500
@@ -37,6 +37,7 @@
#include <stdio.h>
#include <ctype.h>
#include <unistd.h>
+#include <limits.h>
#include "powerman.h"
#include "list.h"
diff -Naurp powerman-1.0.32.orig/src/powerman.c powerman-1.0.32/src/powerman.c
--- powerman-1.0.32.orig/src/powerman.c 2004-02-20 11:51:06.000000000 -0500
+++ powerman-1.0.32/src/powerman.c 2008-02-13 13:28:36.000000000 -0500
@@ -34,6 +34,7 @@
#include <stdlib.h>
#include <assert.h>
#include <libgen.h>
+#include <limits.h>
#include "powerman.h"
#include "wrappers.h"
diff -Naurp powerman-1.0.32.orig/src/powermand.c powerman-1.0.32/src/powermand.c
--- powerman-1.0.32.orig/src/powermand.c 2004-02-20 11:51:06.000000000 -0500
+++ powerman-1.0.32/src/powermand.c 2008-02-13 13:28:47.000000000 -0500
@@ -35,6 +35,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
+#include <limits.h>
#include "powerman.h"
#include "list.h"
diff -Naurp powerman-1.0.32.orig/src/wrappers.c powerman-1.0.32/src/wrappers.c
--- powerman-1.0.32.orig/src/wrappers.c 2005-03-09 06:11:46.000000000 -0500
+++ powerman-1.0.32/src/wrappers.c 2008-02-13 13:26:48.000000000 -0500
@@ -38,6 +38,9 @@
#include <stdlib.h>
#include <sys/socket.h>
#include <stdio.h>
+#include <limits.h>
+#define __USE_GNU /* needed for regex.h */
+#include <regex.h>
#include <sys/types.h>
#include <sys/wait.h>
#if HAVE_POLL