Re: Koji cannot build openldap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Jelinek wrote:
dbm.c is buggy.  It includes <fcntl.h>, which provides open, and POSIX
allows functions to be defined as function-like macros.
Until recently glibc didn't define open as a function like macro, but
in glibc 2.6.90 and later it does when -D_FORTIFY_SOURCE=2, to enforce
correct use of open/open64/openat/openat64.
But dbm.c uses dbm->open (x, y, z, a);, which works when open is
not defined as a function-like macro, but of course can break badly
if it is defined as a function-like macro.
The fix is use () to avoid it being expanded as function-like macro:
(dbm->open) (x, y, z, a);

Maybe POSIX does allow such behavior, but it will break lot of packages - for example all packages who use Berkeley DB (which is my case). I

Patching the DB would result in >500 changed lines and I am bit skeptical about upstream accepting such patch - it would break API compatibility. Is here any way how to tell compiler/glibc not to define open() as macro and still have -D_FORTIFY_SOURCE=2?

Jan

--
Fedora-maintainers mailing list
Fedora-maintainers@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers

--
Fedora-maintainers-readonly mailing list
Fedora-maintainers-readonly@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers-readonly

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux