Index: src/plugin_shortdial.c
--- src/plugin_shortdial.c.orig	2009-03-24 18:38:42 +0100
+++ src/plugin_shortdial.c	2009-10-12 09:03:16 +0200
@@ -26,6 +26,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <sys/types.h>
 #include <netinet/in.h>
Index: src/proxy.c
--- src/proxy.c.orig	2009-07-30 19:20:55 +0200
+++ src/proxy.c	2009-10-12 09:02:53 +0200
@@ -1084,6 +1084,7 @@
                memcpy(&addr_media, &addr_sess, sizeof(addr_sess));
             }
 
+#if 0
             /*
              * Am I running in front of the routing device? Then I cannot
              * use the external IP to bind a listen socket to, but should
@@ -1103,6 +1104,7 @@
                   memcpy(&map_addr, &inside_addr, sizeof (map_addr));
                }
             }
+#endif
 
             sts = rtp_start_fwd(osip_message_get_call_id(mymsg),
                                 client_id,
Index: src/siproxd.c
--- src/siproxd.c.orig	2009-01-07 21:37:11 +0100
+++ src/siproxd.c	2009-10-12 09:02:53 +0200
@@ -29,6 +29,7 @@
 #include <signal.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
+#include <syslog.h>
 
 #ifdef  HAVE_GETOPT_H
 #include <getopt.h>
@@ -145,6 +146,7 @@
 
    log_init();
 
+   openlog("siproxd", LOG_NDELAY, LOG_DAEMON);
    log_set_stderr(1);
 
 /*
@@ -233,6 +235,9 @@
    if (read_config(configfile, config_search, main_cfg_opts, "") == STS_FAILURE) {
       exit(1);
    }
+   /* Don't log to stderr if daemonizing is intended. */
+   if (configuration.daemonize)
+      log_set_stderr(0);
    /* remember where config file is located, so the plugins
     * can load it as well - if required */
    configuration.configfile = strdup(configfile);
Index: src/utils.c
--- src/utils.c.orig	2009-07-30 19:02:28 +0200
+++ src/utils.c	2009-10-12 09:02:53 +0200
@@ -43,6 +43,11 @@
 
 #include <osipparser2/osip_parser.h>
 
+#ifndef MAXINT
+#include <sys/limits.h>
+#define MAXINT INT_MAX
+#endif
+
 #include "siproxd.h"
 #include "log.h"
 
