Browse Source

fix *nix warnings

Vladimir Dubrovin 10 years ago
parent
commit
9ddc1fb874
2 changed files with 5 additions and 5 deletions
  1. 4 4
      src/common.c
  2. 1 1
      src/proxy.h

+ 4 - 4
src/common.c

@@ -157,10 +157,10 @@ struct sockfuncs so = {
 #else
 	mypoll,
 #endif
-	send,
-	sendto,
-	recv,
-	recvfrom,
+	(void *)send,
+	(void *)sendto,
+	(void *)recv,
+	(void *)recvfrom,
 	shutdown,
 #ifdef _WIN32
 	closesocket

+ 1 - 1
src/proxy.h

@@ -104,7 +104,7 @@
 #define PTHREAD_STACK_MIN 32768
 #define sockerror strerror
 #endif
-#define daemonize() daemon(1,1)
+#define daemonize() {if(fork())exit(0); else setsid();}
 #define SLEEPTIME 1000
 #ifndef O_BINARY
 #define O_BINARY 0