diff -uNr gamin-0.1.9/libgamin/Makefile.in gamin-0.1.9-patched/libgamin/Makefile.in
--- gamin-0.1.9/libgamin/Makefile.in	2007-07-27 10:36:40.000000000 -0400
+++ gamin-0.1.9-patched/libgamin/Makefile.in	2007-11-14 14:49:35.000000000 -0500
@@ -260,12 +260,12 @@
 
 CLEANFILES = gam_error.c gam_event.c
 libgamin_1_la_LIBADD = 
-libgamin_1_la_LDFLAGS = -Wl,--version-script=$(srcdir)/gamin_sym.version \
+libgamin_1_la_LDFLAGS = \
                         -version-info @GAMIN_VERSION_INFO@ @THREAD_LIBS@
 
 libfam_la_SOURCES = $(libgamin_1_la_SOURCES)
 libfam_la_LIBADD = $(libgamin_1_la_LIBADD)
-libfam_la_LDFLAGS = -Wl,--version-script=$(srcdir)/gamin_sym.version	\
+libfam_la_LDFLAGS = \
                     -version-info @FAM_VERSION_INFO@ @THREAD_LIBS@
 
 gamin_SOURCES = gamin.c
diff -uNr gamin-0.1.9/libgamin/gam_api.c gamin-0.1.9-patched/libgamin/gam_api.c
--- gamin-0.1.9/libgamin/gam_api.c	2007-07-04 09:36:48.000000000 -0400
+++ gamin-0.1.9-patched/libgamin/gam_api.c	2007-11-14 14:49:15.000000000 -0500
@@ -14,6 +14,8 @@
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <sys/uio.h>
+#include <string.h>
+#include <sys/select.h>
 #include "fam.h"
 #include "gam_protocol.h"
 #include "gam_data.h"
@@ -358,7 +360,7 @@
     int retries = 0;
 
   retry_start:
-    fd = socket(PF_UNIX, SOCK_STREAM, 0);
+    fd = socket(AF_UNIX, SOCK_STREAM, 0);
     if (fd < 0) {
         gam_error(DEBUG_INFO, "Failed to create unix socket\n");
         return (-1);
diff -uNr gamin-0.1.9/python/Makefile.in gamin-0.1.9-patched/python/Makefile.in
--- gamin-0.1.9/python/Makefile.in	2007-07-27 10:36:40.000000000 -0400
+++ gamin-0.1.9-patched/python/Makefile.in	2008-06-24 18:57:26.000000000 -0400
@@ -232,15 +232,15 @@
 AUTOMAKE_OPTIONS = 1.4 foreign
 SUBDIRS = tests
 INCLUDES = \
-	-I$(PYTHON_INCLUDES)	\
 	-I$(top_srcdir)/libgamin\
-	-I$(top_srcdir)/lib
+	-I$(top_srcdir)/lib	\
+	-I$(PYTHON_INCLUDES)
 
 EXTRA_DIST = \
 	gamin.c			\
 	gamin.py
 
-_gamin_la_LDFLAGS = -module -avoid-version -L$(top_builddir)/libgamin/.libs
+_gamin_la_LDFLAGS = -module -avoid-version
 @WITH_PYTHON_TRUE@mylibs = \
 @WITH_PYTHON_TRUE@	$(top_builddir)/libgamin/libgamin-1.la
 
diff -uNr gamin-0.1.9/server/gam_channel.c gamin-0.1.9-patched/server/gam_channel.c
--- gamin-0.1.9/server/gam_channel.c	2007-07-04 09:36:49.000000000 -0400
+++ gamin-0.1.9-patched/server/gam_channel.c	2007-11-14 14:51:43.000000000 -0500
@@ -7,6 +7,7 @@
 #include <sys/stat.h>
 #include <sys/un.h>
 #include <sys/uio.h>
+#include <string.h>
 #include "gam_error.h"
 #include "gam_connection.h"
 #include "gam_channel.h"
@@ -621,7 +622,7 @@
     int fd;
     struct sockaddr_un addr;
 
-    fd = socket(PF_UNIX, SOCK_STREAM, 0);
+    fd = socket(AF_UNIX, SOCK_STREAM, 0);
     if (fd < 0) {
         GAM_DEBUG(DEBUG_INFO, "Failed to create unix socket");
         return (-1);
diff -uNr gamin-0.1.9/server/gam_conf.c gamin-0.1.9-patched/server/gam_conf.c
--- gamin-0.1.9/server/gam_conf.c	2007-07-04 09:36:49.000000000 -0400
+++ gamin-0.1.9-patched/server/gam_conf.c	2008-06-16 01:47:10.000000000 -0400
@@ -7,6 +7,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
+#include <strings.h>
 #include <errno.h>
 #include <glib.h>
 
diff -uNr gamin-0.1.9/server/gam_kqueue.c gamin-0.1.9-patched/server/gam_kqueue.c
--- gamin-0.1.9/server/gam_kqueue.c	2007-07-04 09:50:41.000000000 -0400
+++ gamin-0.1.9-patched/server/gam_kqueue.c	2007-11-14 14:56:02.000000000 -0500
@@ -49,6 +49,9 @@
  */
 
 #include "config.h"
+
+#undef _POSIX_C_SOURCE
+
 #include <string.h>
 #include <fcntl.h>
 #include <unistd.h>
diff -uNr gamin-0.1.9/server/gam_poll_basic.c gamin-0.1.9-patched/server/gam_poll_basic.c
--- gamin-0.1.9/server/gam_poll_basic.c	2007-07-04 09:46:29.000000000 -0400
+++ gamin-0.1.9-patched/server/gam_poll_basic.c	2007-11-14 14:50:51.000000000 -0500
@@ -38,7 +38,6 @@
 #include "gam_event.h"
 #include "gam_excludes.h"
 
-#define VERBOSE_POLL
 
 static gboolean gam_poll_basic_add_subscription(GamSubscription * sub);
 static gboolean gam_poll_basic_remove_subscription(GamSubscription * sub);
diff -uNr gamin-0.1.9/tests/Makefile.in gamin-0.1.9-patched/tests/Makefile.in
--- gamin-0.1.9/tests/Makefile.in	2007-07-27 10:36:40.000000000 -0400
+++ gamin-0.1.9-patched/tests/Makefile.in	2008-06-24 18:56:08.000000000 -0400
@@ -219,7 +219,7 @@
 testgam_SOURCES = testing.c
 testgam_LDFLAGS = 
 testgam_DEPENDENCIES = $(DEPS)
-testgam_LDADD = $(LDADDS) -L$(top_builddir)/libgamin -lgamin-1
+testgam_LDADD = $(LDADDS) $(top_builddir)/libgamin/libgamin-1.la
 all: all-am
 
 .SUFFIXES:
