git: 4d7c78c3d2e4 - main - multimedia/mkvtoolnix: fix build with libc++ 21
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 15 Feb 2026 21:59:28 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4d7c78c3d2e4d40c851da6e6161d29d6a62d3b31
commit 4d7c78c3d2e4d40c851da6e6161d29d6a62d3b31
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-02-14 21:55:01 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-02-15 21:59:17 +0000
multimedia/mkvtoolnix: fix build with libc++ 21
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.)
PR: 293182
Approved by: riggs (maintainer)
MFH: 2026Q1
---
multimedia/mkvtoolnix/files/patch-lib_fmt_include_fmt_format.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/multimedia/mkvtoolnix/files/patch-lib_fmt_include_fmt_format.h b/multimedia/mkvtoolnix/files/patch-lib_fmt_include_fmt_format.h
new file mode 100644
index 000000000000..a8ecd4b0096d
--- /dev/null
+++ b/multimedia/mkvtoolnix/files/patch-lib_fmt_include_fmt_format.h
@@ -0,0 +1,10 @@
+--- lib/fmt/include/fmt/format.h.orig 2026-01-02 12:35:10 UTC
++++ lib/fmt/include/fmt/format.h
+@@ -44,6 +44,7 @@
+ # include <cmath> // std::signbit
+ # include <cstddef> // std::byte
+ # include <cstdint> // uint32_t
++# include <cstdlib> // malloc/free
+ # include <cstring> // std::memcpy
+ # include <limits> // std::numeric_limits
+ # include <new> // std::bad_alloc