See https://bugs.kde.org/show_bug.cgi?id=401018 ; without this patch the project fails to build using Xcode compiler versions because the generated kcddb_export.h header does not match the visibility settings.
The modified code works as expected on Linux and on Mac with stock Clang (from MacPorts, for instance).