1
0
mirror of https://git.freebsd.org/ports.git synced 2026-06-02 11:08:52 +00:00

graphics/khronos-texture: Fix build with libc++ 21

[...]
In file included from /wrkdirs/usr/ports/graphics/khronos-texture/work/KTX-Software-4.4.2/external/fmt/src/os.cc:13:
In file included from /wrkdirs/usr/ports/graphics/khronos-texture/work/KTX-Software-4.4.2/external/fmt/include/fmt/os.h:11:
/wrkdirs/usr/ports/graphics/khronos-texture/work/KTX-Software-4.4.2/external/fmt/include/fmt/format.h:747:28: error: use of undeclared identifier 'malloc'
  747 |     T* p = static_cast<T*>(malloc(n * sizeof(T)));
      |                            ^~~~~~
/wrkdirs/usr/ports/graphics/khronos-texture/work/KTX-Software-4.4.2/external/fmt/include/fmt/format.h:752:35: error: use of undeclared identifier 'free'
  752 |   void deallocate(T* p, size_t) { free(p); }
      |                                   ^~~~
[...]

While here udpate to USES+=compiler:c++14-lang - port uses -std=c++14.

PR:	293197
MFH:	2026Q1
This commit is contained in:
Evgenii Khramtsov
2026-02-16 03:49:49 +03:00
committed by Vladimir Druzenko
parent 60f54761f6
commit 438a70797f
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ LICENSE= APACHE20
BUILD_DEPENDS= bash:shells/bash
USES= cmake compiler:c++11-lib python:build
USES= cmake compiler:c++14-lang python:build
USE_GITHUB= yes
GH_ACCOUNT= KhronosGroup
@@ -0,0 +1,10 @@
--- external/fmt/include/fmt/format.h.orig 2025-10-04 08:06:54 UTC
+++ external/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