diff -r 71764cfdba69 -r 9c764307f9a3 db/db.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/db/db.patch Wed Apr 01 16:24:45 2009 +0200 @@ -0,0 +1,33 @@ +Index: mutex/mut_fcntl.c +--- mutex/mut_fcntl.c.orig 2008-01-08 21:58:43 +0100 ++++ mutex/mut_fcntl.c 2008-05-26 22:36:45 +0200 +@@ -84,7 +84,7 @@ + + /* Acquire an exclusive kernel lock. */ + k_lock.l_type = F_WRLCK; +- if (fcntl(env->lockfhp->fd, F_SETLKW, &k_lock)) ++ if (fcntl(env->lockfhp->fd, F_SETLKW, &k_lock) == -1) + goto err; + + /* If the resource is still available, it's ours. */ +@@ -97,7 +97,7 @@ + + /* Release the kernel lock. */ + k_lock.l_type = F_UNLCK; +- if (fcntl(env->lockfhp->fd, F_SETLK, &k_lock)) ++ if (fcntl(env->lockfhp->fd, F_SETLK, &k_lock) == -1) + goto err; + + /* +Index: os/os_open.c +--- os/os_open.c.orig 2008-03-26 05:11:35 +0100 ++++ os/os_open.c 2008-05-26 22:36:05 +0200 +@@ -67,7 +67,7 @@ + if (LF_ISSET(DB_OSO_EXCL)) + oflags |= O_EXCL; + +-#ifdef HAVE_O_DIRECT ++#if defined(HAVE_O_DIRECT) && defined(__FreeBSD__) + if (LF_ISSET(DB_OSO_DIRECT)) + oflags |= O_DIRECT; + #endif