diff -ur gamin-0.1.2/libgamin/gam_api.c gamin-0.1.2-fbsd/libgamin/gam_api.c --- gamin-0.1.2/libgamin/gam_api.c 2005-06-15 12:53:25.000000000 +0200 +++ gamin-0.1.2-fbsd/libgamin/gam_api.c 2005-07-16 00:15:37.317345328 +0200 @@ -421,7 +421,7 @@ { char data[2] = { 0, 0 }; int written; -#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) +#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) struct { struct cmsghdr hdr; struct cmsgcred cred; @@ -445,7 +445,7 @@ #endif retry: -#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) +#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) written = sendmsg(fd, &msg, 0); #else written = write(fd, &data[0], 1); @@ -655,7 +655,7 @@ s_uid = getuid(); -#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) +#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__) /* Set the socket to receive credentials on the next message */ { int on = 1; Only in gamin-0.1.2-fbsd/libgamin: gam_api.c.orig diff -ur gamin-0.1.2/libgamin/gam_data.c gamin-0.1.2-fbsd/libgamin/gam_data.c --- gamin-0.1.2/libgamin/gam_data.c 2005-05-18 16:45:04.000000000 +0200 +++ gamin-0.1.2-fbsd/libgamin/gam_data.c 2005-07-16 00:15:37.321344720 +0200 @@ -471,7 +471,7 @@ } if (is_threaded > 0) { pthread_mutexattr_init(&attr); - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex_init(&ret->lock, &attr); pthread_mutexattr_destroy(&attr); } diff -ur gamin-0.1.2/server/gam_channel.c gamin-0.1.2-fbsd/server/gam_channel.c --- gamin-0.1.2/server/gam_channel.c 2005-06-15 13:02:34.000000000 +0200 +++ gamin-0.1.2-fbsd/server/gam_channel.c 2005-07-16 00:15:37.326343960 +0200 @@ -29,7 +29,7 @@ { char data[2] = { 0, 0 }; int written; -#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) +#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) struct { struct cmsghdr hdr; struct cmsgcred cred; @@ -53,7 +53,7 @@ #endif retry: -#if defined(HAVE_CMSGCRED) && !defined(LOCAL_CREDS) +#if defined(HAVE_CMSGCRED) && (!defined(LOCAL_CREDS) || defined(__FreeBSD__)) written = sendmsg(fd, &msg, 0); #else written = write(fd, &data[0], 1); @@ -100,7 +100,7 @@ s_uid = getuid(); -#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) +#if defined(LOCAL_CREDS) && defined(HAVE_CMSGCRED) && !defined(__FreeBSD__) /* Set the socket to receive credentials on the next message */ { int on = 1; diff -ur gamin-0.1.2/server/gam_connection.c gamin-0.1.2-fbsd/server/gam_connection.c --- gamin-0.1.2/server/gam_connection.c 2005-06-14 14:31:19.000000000 +0200 +++ gamin-0.1.2-fbsd/server/gam_connection.c 2005-07-16 00:15:37.332343048 +0200 @@ -30,10 +30,7 @@ GMainLoop *loop; /* the Glib loop used */ GIOChannel *source; /* the Glib I/O Channel used */ int request_len; /* how many bytes of request are valid */ - union { - GAMPacket request; /* the next request being read */ - void *request_data; /* the next request as a char * */ - }; + GAMPacket request; /* the next request being read */ GamListener *listener; /* the listener associated with the connection */ }; @@ -245,7 +242,7 @@ g_assert(data); g_assert(size); - *data = (char *) &conn->request_data + conn->request_len; + *data = (char *) &conn->request + conn->request_len; *size = sizeof(GAMPacket) - conn->request_len; return (0); diff -ur gamin-0.1.2/tests/testing.c gamin-0.1.2-fbsd/tests/testing.c --- gamin-0.1.2/tests/testing.c 2005-06-13 10:59:29.000000000 +0200 +++ gamin-0.1.2-fbsd/tests/testing.c 2005-07-16 00:15:37.337342288 +0200 @@ -436,9 +436,9 @@ return (-1); } /* - * wait at most 3 secs before declaring failure + * wait at most 7 secs before declaring failure */ - while ((delay < 30) && (testState.nb_events < nb_events + count)) { + while ((delay < 70) && (testState.nb_events < nb_events + count)) { debugLoop(100); /* printf("+"); fflush(stdout); */ Only in gamin-0.1.2-fbsd/tests: testing.c.orig