D8256: Add _XOPEN_SOURCE to C definitions

Michael Pyne noreply at phabricator.kde.org
Sat Dec 2 20:31:33 UTC 2017


mpyne added a comment.


  As I mentioned on the KDE bug, there is a possibility that changes like this would break FreeBSD.  FreeBSD operates by a model of exporting symbols by default for legacy/BSD-specific needs.  However if a feature flag is set, it limits its exports to *only* that required by the feature flag.  Notably, all BSD-specific exports are removed in FreeBSD if you set a feature flag that doesn't also standardize that BSD feature, and unlike C libraries like musl and glibc, they don't support any feature flags to specifically request BSD-specific exports be exported.
  
  See KIO commit 15451d505fdbc37b5d027f8ad1ba6aeb6314cc2d <https://cgit.kde.org/kio.git/commit/?id=15451d505fdbc37b5d027f8ad1ba6aeb6314cc2d> and https://phabricator.kde.org/D6597 for an example of where I had to take special pains when committing musl-specific fixes to KF5 to avoid breaking FreeBSD.
  
  Andrew, have you been able to test your patches on a FreeBSD at all?  We can catch it in CI now, but on the other hand I have already tried to fix this by pushing feature flag defines into source repositories requiring the extra defines rather than making it a KDE-wide define.  I had previously verified that these fixes allowed all of KF5 (though not all of Plasma5) to build on Alpine Linux, though it's been a month since I had reverified that.

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D8256

To: awilcox, alexmerry, dfaure
Cc: mpyne, dfaure, #frameworks, #build_system
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20171202/8d1a7720/attachment.html>


More information about the Kde-buildsystem mailing list