diff -Nurw gcin-1.5.5~pre17.orig/im-client/gcin-im-client.cpp gcin-1.5.5~pre17/im-client/gcin-im-client.cpp
--- gcin-1.5.5~pre17.orig/im-client/gcin-im-client.cpp	2010-07-11 21:20:40.000000000 +0800
+++ gcin-1.5.5~pre17/im-client/gcin-im-client.cpp	2010-08-09 09:00:21.965104447 +0800
@@ -1,5 +1,6 @@
 #if UNIX
 #include <sys/types.h>
+#include <sys/wait.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <netinet/in.h>
diff -Nurw gcin-1.5.5~pre17.orig/util.cpp gcin-1.5.5~pre17/util.cpp
--- gcin-1.5.5~pre17.orig/util.cpp	2010-07-14 21:12:29.000000000 +0800
+++ gcin-1.5.5~pre17/util.cpp	2010-08-09 09:00:53.173092951 +0800
@@ -1,7 +1,9 @@
 #include "gcin.h"
 
 #if UNIX
+#if !defined CLIENT_LIB || defined DEBUG
 static FILE *out_fp;
+#endif
 
 void p_err(char *fmt,...)
 {
@@ -22,6 +24,7 @@
 #endif
 }
 
+#if !defined CLIENT_LIB || defined DEBUG
 static void init_out_fp()
 {
   if (!out_fp) {
@@ -35,6 +38,7 @@
       out_fp = stdout;
   }
 }
+#endif
 
 #if !CLIENT_LIB
 void dbg_time(char *fmt,...)
