diff -ur orig/weechat-0.1.9/src/common/backtrace.c weechat-0.1.9/src/common/backtrace.c
--- orig/weechat-0.1.9/src/common/backtrace.c	Sat May 20 09:35:56 2006
+++ weechat-0.1.9/src/common/backtrace.c	Sun Jul 30 05:07:47 2006
@@ -62,6 +62,7 @@
  * weechat_backtrace_addr2line: display function name and line with a backtrace address
  */
 
+#ifdef HAVE_BACKTRACE
 void
 weechat_backtrace_addr2line (int number, void *address, char *symbol)
 {
@@ -130,6 +131,7 @@
                                   number, function_name);
     pclose (output);
 }
+#endif
 
 /*
  * weechat_backtrace: display backtrace (called when a SIGSEGV is received)
diff -ur orig/weechat-0.1.9/src/common/log.c weechat-0.1.9/src/common/log.c
--- orig/weechat-0.1.9/src/common/log.c	Mon May 22 07:33:21 2006
+++ weechat-0.1.9/src/common/log.c	Mon Jul 31 11:27:11 2006
@@ -28,7 +28,9 @@
 #include <unistd.h>
 #include <string.h>
 #include <stdarg.h>
+#ifdef HAVE_FLOCK
 #include <sys/file.h>
+#endif
 #include <sys/types.h>
 #include <time.h>
 
diff -ur orig/weechat-0.1.9/src/common/weeconfig.c weechat-0.1.9/src/common/weeconfig.c
--- orig/weechat-0.1.9/src/common/weeconfig.c	Sun May 21 11:04:08 2006
+++ weechat-0.1.9/src/common/weeconfig.c	Sun Jul 30 05:16:43 2006
@@ -1832,7 +1832,7 @@
         return -2;
     snprintf (filename, filename_length, "%s%s" WEECHAT_CONFIG_NAME,
               weechat_home, DIR_SEPARATOR);
-    if ((file = fopen (filename, "rt")) == NULL)
+    if ((file = fopen (filename, "r")) == NULL)
     {
         gui_printf (NULL, _("%s config file \"%s\" not found.\n"),
                     WEECHAT_WARNING, filename);
@@ -2117,7 +2117,7 @@
         return -2;
     snprintf (filename, filename_length, "%s%s" WEECHAT_CONFIG_NAME,
               weechat_home, DIR_SEPARATOR);
-    if ((file = fopen (filename, "wt")) == NULL)
+    if ((file = fopen (filename, "w")) == NULL)
     {
         gui_printf (NULL, _("%s cannot create file \"%s\"\n"),
                     WEECHAT_ERROR, filename);
@@ -2324,7 +2324,7 @@
                   weechat_home, DIR_SEPARATOR);
     }
     
-    if ((file = fopen (filename, "wt")) == NULL)
+    if ((file = fopen (filename, "w")) == NULL)
     {
         gui_printf (NULL, _("%s cannot create file \"%s\"\n"),
                     WEECHAT_ERROR, filename);
diff -ur orig/weechat-0.1.9/src/gui/curses/gui-curses-main.c weechat-0.1.9/src/gui/curses/gui-curses-main.c
--- orig/weechat-0.1.9/src/gui/curses/gui-curses-main.c	Sun May 21 10:12:11 2006
+++ weechat-0.1.9/src/gui/curses/gui-curses-main.c	Sun Jul 30 05:12:47 2006
@@ -51,7 +51,6 @@
 {
     fd_set read_fd;
     static struct timeval timeout, tv;
-    static struct timezone tz;
     t_irc_server *ptr_server;
     t_gui_buffer *ptr_buffer;
     int old_day, old_min, old_sec, diff;
@@ -197,14 +196,14 @@
                         && (new_time >= ptr_server->lag_next_check))
                     {
                         server_sendf (ptr_server, "PING %s\r\n", ptr_server->address);
-                        gettimeofday (&(ptr_server->lag_check_time), &tz);
+                        gettimeofday (&(ptr_server->lag_check_time), NULL);
                     }
                     
                     /* lag timeout => disconnect */
                     if ((ptr_server->lag_check_time.tv_sec != 0)
                         && (cfg_irc_lag_disconnect > 0))
                     {
-                        gettimeofday (&tv, &tz);
+                        gettimeofday (&tv, NULL);
                         diff = (int) get_timeval_diff (&(ptr_server->lag_check_time), &tv);
                         if (diff / 1000 > cfg_irc_lag_disconnect * 60)
                         {
diff -ur orig/weechat-0.1.9/src/irc/irc-recv.c weechat-0.1.9/src/irc/irc-recv.c
--- orig/weechat-0.1.9/src/irc/irc-recv.c	Sun May 14 05:15:42 2006
+++ weechat-0.1.9/src/irc/irc-recv.c	Sun Jul 30 05:09:16 2006
@@ -1358,7 +1358,6 @@
 {
     char *host2, *pos, *pos2, *pos_usec;
     struct timeval tv;
-    struct timezone tz;
     long sec1, usec1, sec2, usec2, difftime;
     t_irc_channel *ptr_channel;
     int highlight;
@@ -1424,7 +1423,7 @@
                     {
                         pos2[0] = '\0';
                         
-                        gettimeofday (&tv, &tz);
+                        gettimeofday (&tv, NULL);
                         sec1 = atol (pos);
                         usec1 = atol (pos_usec);
                         sec2 = tv.tv_sec;
@@ -1690,7 +1689,6 @@
 irc_cmd_recv_pong (t_irc_server *server, char *host, char *nick, char *arguments)
 {
     struct timeval tv;
-    struct timezone tz;
     int old_lag;
     
     /* make gcc happy */
@@ -1702,7 +1700,7 @@
     {
         /* calculate lag (time diff with lag check) */
         old_lag = server->lag;
-        gettimeofday (&tv, &tz);
+        gettimeofday (&tv, NULL);
         server->lag = (int) get_timeval_diff (&(server->lag_check_time), &tv);
         if (old_lag != server->lag)
             gui_status_draw (gui_current_window->buffer, 1);
diff -ur orig/weechat-0.1.9/src/irc/irc-send.c weechat-0.1.9/src/irc/irc-send.c
--- orig/weechat-0.1.9/src/irc/irc-send.c	Wed May 24 17:35:47 2006
+++ weechat-0.1.9/src/irc/irc-send.c	Sun Jul 30 05:08:56 2006
@@ -50,7 +51,7 @@
 void
 irc_login (t_irc_server *server)
 {
-    char hostname[NI_MAXHOST];
+    char hostname[256];
     
     if ((server->password) && (server->password[0]))
         server_sendf (server, "PASS %s\r\n", server->password);
@@ -58,7 +59,7 @@
     gethostname (hostname, sizeof (hostname) - 1);
     hostname[sizeof (hostname) - 1] = '\0';
     if (!hostname[0])
-        snprintf (hostname, NI_MAXHOST, "unknown");
+        snprintf (hostname, sizeof (hostname), "unknown");
     
     irc_display_prefix (server, server->buffer, PREFIX_INFO);
     gui_printf (server->buffer,
@@ -436,7 +437,6 @@
 {
     char *pos_type, *pos_args, *pos;
     struct timeval tv;
-    struct timezone tz;
     
     /* make gcc happy */
     (void) channel;
@@ -478,7 +478,7 @@
         
         if ((ascii_strcasecmp (pos_type, "ping") == 0) && (!pos_args))
         {
-            gettimeofday (&tv, &tz);
+            gettimeofday (&tv, NULL);
             server_sendf (server, "PRIVMSG %s :\01PING %d %d\01\r\n",
                           arguments, tv.tv_sec, tv.tv_usec);
             gui_printf (server->buffer, " %s%d %d\n",
diff -ur orig/weechat-0.1.9/src/irc/irc-server.c weechat-0.1.9/src/irc/irc-server.c
--- orig/weechat-0.1.9/src/irc/irc-server.c	Sat May 20 05:23:23 2006
+++ weechat-0.1.9/src/irc/irc-server.c	Sun Jul 30 05:09:46 2006
@@ -1157,7 +1158,7 @@
 int
 resolve (char *hostname, char *ip, int *version)
 {
-    char ipbuffer[NI_MAXHOST];
+    char ipbuffer[256];
     struct addrinfo *res;
     
     if (version != NULL)
@@ -1214,7 +1215,7 @@
         char user[64];          /* username (64 characters seems to be enought) */
     } socks4;
     unsigned char buffer[24];
-    char ip_addr[NI_MAXHOST];
+    char ip_addr[256];
 
     socks4.version = 4;
     socks4.method = 1;
diff -ur orig/weechat-0.1.9/src/plugins/plugins-config.c weechat-0.1.9/src/plugins/plugins-config.c
--- orig/weechat-0.1.9/src/plugins/plugins-config.c	Fri Mar 24 04:38:54 2006
+++ weechat-0.1.9/src/plugins/plugins-config.c	Sun Jul 30 05:16:29 2006
@@ -239,7 +239,7 @@
         return;
     snprintf (filename, filename_length, "%s%s" WEECHAT_PLUGINS_CONFIG_NAME,
               weechat_home, DIR_SEPARATOR);
-    if ((file = fopen (filename, "rt")) == NULL)
+    if ((file = fopen (filename, "r")) == NULL)
         return;
     
     line_number = 0;
@@ -346,7 +346,7 @@
     snprintf (filename, filename_length, "%s%s" WEECHAT_PLUGINS_CONFIG_NAME,
               weechat_home, DIR_SEPARATOR);
     
-    if ((file = fopen (filename, "wt")) == NULL)
+    if ((file = fopen (filename, "w")) == NULL)
     {
         irc_display_prefix (NULL, NULL, PREFIX_ERROR);
         gui_printf (NULL, _("%s cannot create file \"%s\"\n"),
