Dimitry Andric 1fe6f24779 math/vtk9: fix build with libc++ 21
With libc++ 21, math/vtk9 fails to compile, resulting in errors similar
to:

    In file included from /wrkdirs/usr/ports/math/vtk9/work/VTK-9.5.2/ThirdParty/fmt/vtkfmt/src/os.cc:14:
    In file included from /wrkdirs/usr/ports/math/vtk9/work/VTK-9.5.2/ThirdParty/fmt/vtkfmt/vtkfmt/os.h:11:
    /wrkdirs/usr/ports/math/vtk9/work/VTK-9.5.2/ThirdParty/fmt/vtkfmt/vtkfmt/format.h:747:28: error: use of undeclared identifier 'malloc'
      747 |     T* p = static_cast<T*>(malloc(n * sizeof(T)));
          |                            ^~~~~~
    /wrkdirs/usr/ports/math/vtk9/work/VTK-9.5.2/ThirdParty/fmt/vtkfmt/vtkfmt/format.h:752:35: error: use of undeclared identifier 'free'
      752 |   void deallocate(T* p, size_t) { free(p); }
          |                                   ^~~~

This is because malloc and free are defined in <cstdlib>, which is not
included in vtk's format.h. Add the include to fix the build.

PR:		292590
Approved by:	yuri (maintainer)
MFH:		2026Q1
2026-01-31 19:18:37 +01:00
..
2026-01-31 19:18:37 +01:00
2025-12-30 07:00:05 -05:00