[Bug 293182] multimedia/mkvtoolnix: fix build with libc++ 21

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 14 Feb 2026 21:54:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293182

            Bug ID: 293182
           Summary: multimedia/mkvtoolnix: fix build with libc++ 21
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: riggs@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(riggs@FreeBSD.org)
          Assignee: riggs@FreeBSD.org

With libc++ 21 multimedia/mkvtoolnix fails to build, with errors similar
to:

    In file included from lib/fmt/src/os.cc:13:
    In file included from lib/fmt/include/fmt/os.h:11:
    lib/fmt/include/fmt/format.h:745:28: fatal error: use of undeclared
identifier 'malloc'
      745 |     T* p = static_cast<T*>(malloc(n * sizeof(T)));
          |                            ^~~~~~

This is because malloc and free are defined in <cstdlib>, and os.h does
not explicitly include it. (Before libc++ 21, the fmt library was
"lucky" that <cstdlib> was included transitively, but this is no longer
the case.)

-- 
You are receiving this mail because:
You are the assignee for the bug.