diff --git a/var/spack/repos/builtin/packages/findutils/nonnull.patch b/var/spack/repos/builtin/packages/findutils/nonnull.patch new file mode 100644 index 00000000000..0103b5d9b3a --- /dev/null +++ b/var/spack/repos/builtin/packages/findutils/nonnull.patch @@ -0,0 +1,11 @@ +--- a/gl/lib/malloc/dynarray-skeleton.c ++++ b/gl/lib/malloc/dynarray-skeleton.c +@@ -85,6 +85,8 @@ + (if DYNARRAY_FINAL_TYPE is not defined) + */ + + #include ++#undef __nonnull ++#define __nonnull(x) + + #include diff --git a/var/spack/repos/builtin/packages/findutils/package.py b/var/spack/repos/builtin/packages/findutils/package.py index d529bf8147c..eefa00783ca 100644 --- a/var/spack/repos/builtin/packages/findutils/package.py +++ b/var/spack/repos/builtin/packages/findutils/package.py @@ -51,6 +51,11 @@ def url_for_version(self, version): patch('nvhpc.patch', when='@4.6.0 %nvhpc') # Workaround bug where __LONG_WIDTH__ is not defined patch('nvhpc-long-width.patch', when='@4.8.0:4.8 %nvhpc') + # Auto-detecting whether `__attribute__((__nonnull__(...)))` is supported + # does not work for GCC on macOS + # ; we thus + # disable this attribute manually + patch('nonnull.patch') build_directory = 'spack-build'