Issue 7209 - Changes to libraries/libmdb/mdb.c needed to build on FreeBSD
Summary: Changes to libraries/libmdb/mdb.c needed to build on FreeBSD
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: 2.4.28
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-14 19:54 UTC by 4glitch@gmail.com
Modified: 2015-11-30 18:23 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description 4glitch@gmail.com 2012-03-14 19:54:43 UTC
Full_Name: Dmitri Bogomolov
Version: 2.4.28
OS: Gentoo/FreeBSD
URL: ftp://ftp.openldap.org/incoming/dmitri-bogomolov-120314.patch
Submission from: (NULL) (176.36.139.33)


As I can see, FreeBSD have no O_DSYNC, no fdatasync(fd). I've been able to build
openldap-2.4.30 with trivial fix.

Can you please include it in next version?
Comment 1 Howard Chu 2012-03-14 21:08:50 UTC
4glitch@gmail.com wrote:
> Full_Name: Dmitri Bogomolov
> Version: 2.4.28
> OS: Gentoo/FreeBSD
> URL: ftp://ftp.openldap.org/incoming/dmitri-bogomolov-120314.patch
> Submission from: (NULL) (176.36.139.33)
>
>
> As I can see, FreeBSD have no O_DSYNC, no fdatasync(fd). I've been able to build
> openldap-2.4.30 with trivial fix.
>
> Can you please include it in next version?

No. Compile with -DMDB_SYNC and -DMDB_FDATASYNC yourself like it says in the 
comments in mdb.c.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Howard Chu 2012-03-14 21:11:37 UTC
changed state Open to Closed
Comment 3 4glitch@gmail.com 2012-03-14 21:37:14 UTC
03/14/2012 11:08 PM, Howard Chu написав(ла):
> No. Compile with -DMDB_SYNC and -DMDB_FDATASYNC yourself like it says
> in the comments in mdb.c.
>
Why ANDROID and __APPLE__ special? mdb.c contains definitions of
fdatasync(fd) for it.

Comment 4 Hallvard Furuseth 2012-03-17 04:29:38 UTC
 Thanks for your report. We need to hear of OSes which do not
 provide O_DSYNC and fdatasync() and how to deal with them,
 so for now MDB demands them unless explicitly disabled.

 But the solution will not be a bunch of '#if <OS>'es.  Maybe
 some POSIX feature test macros will be enough, or maybe we
 can use configure and wrap libmdb/mdb in back-mdb/mdb-wrap.c
 which makes use of the configure macros.

 On Wed, 14 Mar 2012 21:34:37 GMT, 4glitch@gmail.com wrote:
> Why ANDROID and __APPLE__ special?

 I can't speak for Howard, but:

 Got there during development.  MDB is still evolving.

 The solution will not be a bunch of '#ifdef <OS>'es.  Maybe
 some POSIX feature test macros will be enough, or maybe we
 can use configure and wrap libmdb/mdb in back-mdb/mdb-wrap.c
 which makes use of the configure macros.

-- 
 Hallvard

Comment 5 OpenLDAP project 2015-11-17 17:24:43 UTC
fixed in mdb.master
Comment 6 Hallvard Furuseth 2015-11-17 17:24:43 UTC
changed notes
changed state Closed to Test
moved from Incoming to Build
Comment 7 Quanah Gibson-Mount 2015-11-30 18:23:06 UTC
changed state Test to Closed