Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2018 00:01:28 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r478269 - in head/databases/lmdb: . files
Message-ID:  <201808280001.w7S01Sr1023525@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Aug 28 00:01:28 2018
New Revision: 478269
URL: https://svnweb.freebsd.org/changeset/ports/478269

Log:
  databases/lmdb: switch to robust mutexes on FreeBSD >= 11
  
  PR:		230564
  Approved by:	delphij (maintainer)

Modified:
  head/databases/lmdb/Makefile   (contents, props changed)
  head/databases/lmdb/files/patch-mdb.c   (contents, props changed)

Modified: head/databases/lmdb/Makefile
==============================================================================
--- head/databases/lmdb/Makefile	Tue Aug 28 00:01:14 2018	(r478268)
+++ head/databases/lmdb/Makefile	Tue Aug 28 00:01:28 2018	(r478269)
@@ -4,6 +4,7 @@
 PORTNAME=	lmdb
 PORTVERSION=	0.9.22
 DISTVERSIONPREFIX=	${PORTNAME:tu}_
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	databases
 

Modified: head/databases/lmdb/files/patch-mdb.c
==============================================================================
--- head/databases/lmdb/files/patch-mdb.c	Tue Aug 28 00:01:14 2018	(r478268)
+++ head/databases/lmdb/files/patch-mdb.c	Tue Aug 28 00:01:28 2018	(r478269)
@@ -1,11 +1,23 @@
---- mdb.c.orig	2017-06-01 16:51:10 UTC
+- NetBSD has fdatasync(2), see https://github.com/NetBSD/src/commit/e963c41c6fb9
+- OpenBSD has fdatasync(3), see https://github.com/openbsd/src/commit/aa96fc3dc04f
+- FreeBSD 11.0 has robust mutexes (see base r300043) and 11.1 has fdatasync(2) (see base r304977)
+
+--- mdb.c.orig	2018-03-22 15:23:05 UTC
 +++ mdb.c
-@@ -125,6 +125,8 @@ typedef SSIZE_T	ssize_t;
+@@ -124,11 +124,12 @@ typedef SSIZE_T	ssize_t;
+ #include <resolv.h>	/* defines BYTE_ORDER on HPUX and Solaris */
+ #endif
+ 
+-#if defined(__APPLE__) || defined (BSD) || defined(__FreeBSD_kernel__)
+-# define MDB_USE_POSIX_SEM	1
++#if defined(__APPLE__) || defined(ANDROID) || defined(__DragonFly__) || (defined(__FreeBSD__) && __FreeBSD__ < 11)
  # define MDB_FDATASYNC		fsync
- #elif defined(ANDROID)
- # define MDB_FDATASYNC		fsync
-+#elif defined(__FreeBSD_version) && __FreeBSD_version < 1101000
-+# define MDB_FDATASYNC		fsync
+-#elif defined(ANDROID)
+-# define MDB_FDATASYNC		fsync
++#endif
++
++#if defined(__APPLE__) || defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) || (defined(__FreeBSD__) && __FreeBSD__ < 11)
++# define MDB_USE_POSIX_SEM	1
  #endif
  
  #ifndef _WIN32



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808280001.w7S01Sr1023525>