diff -ruN -x '*.o' -x '*.res' -x '*.exe' netstatp.orig/Makefile netstatp/Makefile
--- netstatp.orig/Makefile	1969-12-31 16:00:00.000000000 -0800
+++ netstatp/Makefile	2004-01-16 02:12:06.859375000 -0800
@@ -0,0 +1,15 @@
+all: netstatp.exe
+
+netstatp.exe: netstatp.o netstatp.res
+	gcc netstatp.o netstatp.res -o netstatp.exe -liphlpapi
+
+netstatp.o: netstatp.c netstatp.h
+	gcc -c netstatp.c 
+
+netstatp.res: netstatp.rc resource.h
+	windres -O coff netstatp.rc netstatp.res
+
+clean:
+	rm -f netstatp.exe netstatp.o netstatp.res
+
+.PHONY: all clean
diff -ruN -x '*.o' -x '*.res' -x '*.exe' netstatp.orig/netstatp.c netstatp/netstatp.c
--- netstatp.orig/netstatp.c	2002-03-30 04:30:44.000000000 -0800
+++ netstatp/netstatp.c	2004-01-16 01:55:17.781250000 -0800
@@ -13,7 +13,14 @@
 //------------------------------------------------------------
 #include "windows.h"
 #include "stdio.h"
-#include "winsock.h"
+
+#ifdef __CYGWIN__
+  #include "netdb.h"
+  #include "sys/socket.h"
+#else
+  #include "winsock.h"
+#endif
+
 #include "iprtrmib.h"
 #include "tlhelp32.h"
 #include "iphlpapi.h"
@@ -376,7 +383,9 @@
 {
 	DWORD		error, dwSize;
 	WORD		wVersionRequested;
+#ifndef __CYGWIN__
 	WSADATA		wsaData;
+#endif
 	HANDLE		hProcessSnap;
 	PMIB_TCPEXTABLE tcpExTable;
 	PMIB_TCPTABLE tcpTable;
@@ -408,12 +417,14 @@
 	//
 	// Initialize winsock
 	//
+#ifndef __CYGWIN__
 	wVersionRequested = MAKEWORD( 1, 1 );
 	if( WSAStartup(  wVersionRequested, &wsaData ) ) {
 
 		printf("Could not initialize Winsock.\n");
 		return -1;
 	}
+#endif
 
 	//
 	// Get options
diff -ruN -x '*.o' -x '*.res' -x '*.exe' netstatp.orig/netstatp.h netstatp/netstatp.h
--- netstatp.orig/netstatp.h	2002-03-26 07:44:16.000000000 -0800
+++ netstatp/netstatp.h	2004-01-16 01:55:32.250000000 -0800
@@ -55,4 +55,5 @@
 typedef struct {
 	DWORD			dwNumEntries;
 	MIB_UDPEXROW	table[ANY_SIZE];
-} MIB_UDPEXTABLE, *PMIB_UDPEXTABLE;
\ No newline at end of file
+} MIB_UDPEXTABLE, *PMIB_UDPEXTABLE;
+

