db/db.patch

changeset 121
9c764307f9a3
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/db/db.patch	Wed Apr 01 16:24:45 2009 +0200
     1.3 @@ -0,0 +1,33 @@
     1.4 +Index: mutex/mut_fcntl.c
     1.5 +--- mutex/mut_fcntl.c.orig	2008-01-08 21:58:43 +0100
     1.6 ++++ mutex/mut_fcntl.c	2008-05-26 22:36:45 +0200
     1.7 +@@ -84,7 +84,7 @@
     1.8 + 
     1.9 + 		/* Acquire an exclusive kernel lock. */
    1.10 + 		k_lock.l_type = F_WRLCK;
    1.11 +-		if (fcntl(env->lockfhp->fd, F_SETLKW, &k_lock))
    1.12 ++		if (fcntl(env->lockfhp->fd, F_SETLKW, &k_lock) == -1)
    1.13 + 			goto err;
    1.14 + 
    1.15 + 		/* If the resource is still available, it's ours. */
    1.16 +@@ -97,7 +97,7 @@
    1.17 + 
    1.18 + 		/* Release the kernel lock. */
    1.19 + 		k_lock.l_type = F_UNLCK;
    1.20 +-		if (fcntl(env->lockfhp->fd, F_SETLK, &k_lock))
    1.21 ++		if (fcntl(env->lockfhp->fd, F_SETLK, &k_lock) == -1)
    1.22 + 			goto err;
    1.23 + 
    1.24 + 		/*
    1.25 +Index: os/os_open.c
    1.26 +--- os/os_open.c.orig	2008-03-26 05:11:35 +0100
    1.27 ++++ os/os_open.c	2008-05-26 22:36:05 +0200
    1.28 +@@ -67,7 +67,7 @@
    1.29 + 	if (LF_ISSET(DB_OSO_EXCL))
    1.30 + 		oflags |= O_EXCL;
    1.31 + 
    1.32 +-#ifdef HAVE_O_DIRECT
    1.33 ++#if defined(HAVE_O_DIRECT) && defined(__FreeBSD__)
    1.34 + 	if (LF_ISSET(DB_OSO_DIRECT))
    1.35 + 		oflags |= O_DIRECT;
    1.36 + #endif

mercurial