[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#5075) openldap is not compilable with newest glibc and -D_FORTIFY_SOURCE=2

Full_Name: Jan Safranek
Version: 2.3.37
OS: Linux (Fedora rawhide)
URL: http://people.redhat.com/jsafrane/openldap-2.3.37-fortify-open.patch
Submission from: (NULL) (

Recently we have integrated glibc 2.6.90 into Fedora Linux distribution and
OpenLDAP is not compilable anymore. We use -D_FORTIFY_SOURCE=2 to check for
common errors on compile time and this switch causes that open() in fcntl.h
is not a function name but a macro in the new glibc headers. Berkeley DB often
uses 'something->open(...)' to open database, which is expanded by the compiler
using the macro from fcntl.h -> compilation error.

Compilation can be easily fixed by using additional braces around open, like

I do not like open() being macro, but POSIX allows it and glibc guys seems to be
quite strict in this. The new glibc shall be released in fall and all major
distributions will use it sooner or later, therefore I would suggest to adapt
few OpenLDAP sources to it.