Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
COMP: Fix Slicer vtkITK build on macOS
This commit addresses a Slicer macOS build error reported on Discourse (see https://discourse.slicer.org/t/slicer-build-on-macos-monterey/21940) and on GitHub (see comments on issue #5944). The _POSIX_SOURCE preprocessor identifier is defined in several places including by Python and several ITK ThirdParty modules. It looks like this definition is causing unintended side effects when building vtkITK. When itkMacro.h is #included in vtkITK, _POSIX_SOURCE causes conditional inclusion of code using __assert_fail and __ASSERT_FUNCTION, which are defined by GLIBC. Compiling under Clang on macOS this results in a compile error. This commit fixes the error by checking for the __GLIBC__ preprocessor identifier instead of __POSIX_SOURCE.
- Loading branch information