diff --git a/Network/Fancy.hsc b/Network/Fancy.hsc
--- a/Network/Fancy.hsc
+++ b/Network/Fancy.hsc
@@ -38,7 +38,33 @@
 import GHC.Conc(asyncDoProc)
 #endif
 
-#include "network-fancy.h"
+#ifndef WINDOWS
+#include <arpa/inet.h>
+#include <errno.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#define SAFE_ON_WIN unsafe
+
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
+#else /* WINDOWS */
+
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define sa_family_t short
+#define AI_NUMERICSERV 0
+
+struct network_fancy_aaccept {
+  SOCKET s;
+  struct sockaddr *addr;
+  int alen;
+};
+#define SAFE_ON_WIN safe
+
+#endif /* WINDOWS */
 
 type HostName = String
 
diff --git a/cbits.c b/cbits.c
--- a/cbits.c
+++ b/cbits.c
@@ -1,5 +1,31 @@
-#include "network-fancy.h"
+#ifndef WINDOWS
+#include <arpa/inet.h>
+#include <errno.h>
+#include <netdb.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#define SAFE_ON_WIN unsafe
 
+#ifndef AF_LOCAL
+#define AF_LOCAL AF_UNIX
+#endif
+
+#else /* WINDOWS */
+
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#define sa_family_t short
+#define AI_NUMERICSERV 0
+
+struct network_fancy_aaccept {
+  SOCKET s;
+  struct sockaddr *addr;
+  int alen;
+};
+#define SAFE_ON_WIN safe
+
+
+#endif
 int getSocketError(void) { return errno; }
 
 int getsockopt_error(int fd) {
diff --git a/network-fancy.cabal b/network-fancy.cabal
--- a/network-fancy.cabal
+++ b/network-fancy.cabal
@@ -1,5 +1,5 @@
 Name:                network-fancy
-Version:             0.1
+Version:             0.1.1
 Synopsis:            Networking support with a cleaner API
 Description:         Networking support with a cleaner API
 License:             BSD3
@@ -16,8 +16,6 @@
     Other-Modules:       Network.Fancy
     GHC-Options:         -threaded
     C-Sources:           cbits.c
-    Includes:            network-fancy.h
-    Include-dirs:        .
     Build-depends:	 base == 4.*, bytestring, random, directory
     Extensions:          TypeSynonymInstances, ForeignFunctionInterface, CPP, DeriveDataTypeable
     if os(windows) {
@@ -36,8 +34,6 @@
     Build-Depends:       base == 4.*, bytestring
     Exposed-modules:     Network.Fancy
     C-Sources:           cbits.c
-    Includes:            network-fancy.h
-    Include-dirs:        .
     GHC-Options:         -Wall
     Extensions:          TypeSynonymInstances, ForeignFunctionInterface, CPP, DeriveDataTypeable
     if os(windows) {
