diff -Nur winpcap.orig//wpcap/libpcap/rpcapd/daemon.c winpcap//wpcap/libpcap/rpcapd/daemon.c
--- winpcap.orig//wpcap/libpcap/rpcapd/daemon.c	2010-04-28 11:32:46.128781662 +0200
+++ winpcap//wpcap/libpcap/rpcapd/daemon.c	2010-04-28 13:26:18.268914900 +0200
@@ -434,9 +434,7 @@
 			sock_close(pars->sockctrl, NULL, 0);
 		
 		free(pars);
-#ifdef WIN32
 		pthread_exit(0);
-#endif
 	}
 }
 
@@ -1604,28 +1602,7 @@
 #ifdef WIN32
 	Sleep(msec);
 #else
-struct timespec abstime;
-struct timeval now;
-
-	pthread_cond_t cond;
-	pthread_mutex_t mutex;
-	pthread_mutexattr_t attr;
-
-	pthread_mutexattr_init(&attr);
-	pthread_mutex_init(&mutex, &attr);
-	pthread_mutex_lock(&mutex);
-
-	pthread_cond_init(&cond, NULL);
-
-	gettimeofday(&now, NULL);
-	
-	abstime.tv_sec = now.tv_sec + msec/1000;
-	abstime.tv_nsec = now.tv_usec * 1000 + (msec%1000) * 1000 * 1000;
-
-	pthread_cond_timedwait(&cond, &mutex, &abstime);
-
-	pthread_mutex_destroy(&mutex);
-	pthread_cond_destroy(&cond);
+	sleep(msec);
 #endif
 }
 
diff -Nur winpcap.orig//wpcap/libpcap/rpcapd/Makefile winpcap//wpcap/libpcap/rpcapd/Makefile
--- winpcap.orig//wpcap/libpcap/rpcapd/Makefile	2010-04-28 08:15:06.721911582 +0200
+++ winpcap//wpcap/libpcap/rpcapd/Makefile	2010-04-28 13:18:29.297107379 +0200
@@ -3,12 +3,12 @@
 ################################
 
 CC      = gcc
-CFLAGS  = -pthread -DHAVE_REMOTE -DHAVE_SNPRINTF
+CFLAGS  = -pthread -DHAVE_REMOTE -DHAVE_SNPRINTF -D_REENTRANT
 #flags for debugging: -D_DEBUG -g -Wall
 
 INCLUDE = -I../
 
-LIB	= -lpcap -lcrypt
+LIB	= -lpcap -lcrypt -lpthread
 #Solaris: add '-lsocket'
 
 LIBPATH	= -L../
diff -Nur winpcap.orig//wpcap/libpcap/rpcapd/rpcapd.c winpcap//wpcap/libpcap/rpcapd/rpcapd.c
--- winpcap.orig//wpcap/libpcap/rpcapd/rpcapd.c	2010-04-28 08:15:06.743911792 +0200
+++ winpcap//wpcap/libpcap/rpcapd/rpcapd.c	2010-04-28 13:22:53.836439785 +0200
@@ -75,11 +75,6 @@
 void main_active(void *ptr);
 
 
-#ifndef WIN32
-void main_cleanup_childs(int sign);
-#endif
-
-
 /*!
 	\brief Prints the usage screen if it is launched in console mode.
 */
@@ -229,12 +224,6 @@
 	if (loadfile[0])
 		fileconf_read(0);
 
-#ifdef linux
-	// SIGTERM (i.e. kill -15) is not generated in WIN32, although it is included for ANSI compatibility
-	signal(SIGTERM, main_cleanup);
-	signal(SIGCHLD, main_cleanup_childs);
-#endif
-
 	// forking a daemon, if it is needed
 	if (isdaemon)
 	{
@@ -304,12 +293,8 @@
 char errbuf[PCAP_ERRBUF_SIZE + 1];	// keeps the error string, prior to be printed
 struct addrinfo *addrinfo;				// keeps the addrinfo chain; required to open a new socket
 int i;
-#ifdef WIN32
 	pthread_t threadId;					// Pthread variable that keeps the thread structures
 	pthread_attr_t detachedAttribute;	// PThread attribute needed to create the thread as detached
-#else
-	pid_t pid;
-#endif
 
 	i= 0;
 	addrinfo= NULL;
@@ -320,7 +305,6 @@
 	{
 		activelist[i].ai_family= mainhints.ai_family;
 		
-#ifdef WIN32
 		/* GV we need this to create the thread as detached. */
 		/* GV otherwise, the thread handle is not destroyed  */
 		pthread_attr_init(&detachedAttribute); 
@@ -333,13 +317,6 @@
 			continue;
 		}
 		pthread_attr_destroy(&detachedAttribute);
-#else
-		if ( (pid= fork() ) == 0)	// I am the child
-		{
-			main_active( (void *) &activelist[i]);
-			exit(0);
-		}
-#endif
 		i++;
 	}
 
@@ -388,7 +365,6 @@
 
 			*socktemp= sockmain;
 
-#ifdef WIN32
 			/* GV we need this to create the thread as detached. */
 			/* GV otherwise, the thread handle is not destroyed  */
 			pthread_attr_init(&detachedAttribute); 
@@ -402,13 +378,6 @@
 			}
 
 			pthread_attr_destroy(&detachedAttribute);
-#else
-			if ( (pid= fork() ) == 0)	// I am the child
-			{
-				main_passive( (void *) socktemp);
-				return;
-			}
-#endif
 			tempaddrinfo= tempaddrinfo->ai_next;
 		}
 
@@ -439,12 +408,6 @@
 */
 void main_cleanup(int sign)
 {
-#ifndef WIN32
-	// Sends a KILL signal to all the processes
-	// that share the same process group (i.e. kills all the childs)
-	kill(0, SIGKILL);
-#endif
-
 	SOCK_ASSERT(PROGRAM_NAME " is closing.\n", 1);
 
 	// FULVIO (bug)
@@ -476,27 +439,6 @@
 
 
 
-#ifdef linux
-
-void main_cleanup_childs(int sign)
-{
-pid_t pid;
-int stat;
-
-	// For reference, Stevens, pg 128
-
-	while ( (pid= waitpid(-1, &stat, WNOHANG) ) > 0)
-		SOCK_ASSERT("Child terminated", 1);
-
-	return;
-}
-
-#endif
-
-
-
-
-
 /*!
 	\brief 'true' main of the program.
 
@@ -518,10 +460,6 @@
 socklen_t fromlen;				// keeps the length of the sockaddr_storage variable
 SOCKET sockmain;
 
-#ifndef WIN32
-	pid_t pid;
-#endif
-
 	sockmain= *((SOCKET *) ptr);
 
 	// Delete the pointer (which has been allocated in the main)
@@ -533,10 +471,8 @@
 	// main thread loop
 	while (1)
 	{
-#ifdef WIN32
 	pthread_t threadId;					// Pthread variable that keeps the thread structures
 	pthread_attr_t detachedAttribute;
-#endif
 	struct daemon_slpars *pars;			// parameters needed by the daemon_serviceloop()
 
 		// Connection creation
@@ -572,7 +508,6 @@
 		}
 
 
-#ifdef WIN32
 		// in case of passive mode, this variable is deallocated by the daemon_serviceloop()
 		pars= (struct daemon_slpars *) malloc ( sizeof(struct daemon_slpars) );
 		if (pars == NULL)
@@ -597,35 +532,6 @@
 			continue;
 		}
 		pthread_attr_destroy(&detachedAttribute);
-
-#else
-		if ( (pid= fork() ) == 0)	// I am the child
-		{
-			// in case of passive mode, this variable is deallocated by the daemon_serviceloop()
-			pars= (struct daemon_slpars *) malloc ( sizeof(struct daemon_slpars) );
-			if (pars == NULL)
-			{
-				snprintf(errbuf, PCAP_ERRBUF_SIZE, "malloc() failed: %s", pcap_strerror(errno));
-				exit(0);
-			}
-
-			pars->sockctrl= sockctrl;
-			pars->activeclose= 0;		// useless in passive mode
-			pars->isactive= 0;
-			pars->nullAuthAllowed= nullAuthAllowed;
-
-			// Close the main socket (must be open only in the parent)
-			closesocket(sockmain);
-
-			daemon_serviceloop( (void *) pars);
-			exit(0);
-		}
-
-		// I am the parent
-		// Close the childsocket (must be open only in the child)
-		closesocket(sockctrl);
-#endif
-
 		// loop forever, until interrupted
 	}
 }
