diff -u -r -x '*.o' -x '*.d' -x '*.stamp' src/dotd.c /Users/sroderick/tmp/distcc-3.1-patched/src/dotd.c
--- src/dotd.c	2008-12-02 16:50:25.000000000 -0500
+++ /Users/sroderick/tmp/distcc-3.1-patched/src/dotd.c	2009-09-01 08:49:03.000000000 -0400
@@ -18,6 +18,8 @@
  * USA.
  */
 
+#include <config.h>
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
diff -u -r -x '*.o' -x '*.d' -x '*.stamp' src/emaillog.c /Users/sroderick/tmp/distcc-3.1-patched/src/emaillog.c
--- src/emaillog.c	2008-12-02 16:50:24.000000000 -0500
+++ /Users/sroderick/tmp/distcc-3.1-patched/src/emaillog.c	2009-09-01 08:47:45.000000000 -0400
@@ -18,6 +18,8 @@
  * USA.
  */
 
+#include <config.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
@@ -120,7 +122,7 @@
   asprintf(&will_send_message_to, will_send_message_format, whom_to_blame);
   asprintf(&cant_send_message_to, cant_send_message_format, whom_to_blame);
 
-  rs_log_warning(will_send_message_to);
+  rs_log_warning("%s", will_send_message_to);
   free(will_send_message_to);
 
   if (email_fileno < 0) {
diff -u -r -x '*.o' -x '*.d' -x '*.stamp' src/hosts.c /Users/sroderick/tmp/distcc-3.1-patched/src/hosts.c
--- src/hosts.c	2008-12-02 16:50:24.000000000 -0500
+++ /Users/sroderick/tmp/distcc-3.1-patched/src/hosts.c	2009-09-01 08:50:13.000000000 -0400
@@ -125,7 +125,7 @@
 int dcc_compare_container(const void *a, const void *b);
 
 
-#ifndef HAVE_STRNDUP
+#if !HAVE_STRNDUP
 /**
  * Copy at most @p size characters from @p src, plus a terminating nul.
  *

