gfxstream: fix build with gcc15

- add patch that adds missing `#include <cstdint>`, similar to what fedora does:
https://src.fedoraproject.org/rpms/gfxstream/raw/2c7cbc24596973e2efc8180af81e57ddfa24654b/f/fix_missing_cstdint.patch
(it applies, but somehow we hit more places with missing headers even
with that patch)

Fixes build failure with gcc15:
```
In file included from ../host/compressedTextureFormats/AstcCpuDecompressorNoOp.cpp:15:
../host/compressedTextureFormats/AstcCpuDecompressor.h:48:32:
error: 'uint32_t' has not been declared
   48 |     virtual int32_t decompress(uint32_t imgWidth, uint32_t imgHeight, uint32_t blockWidth,
      |                                ^~~~~~~~
../host/compressedTextureFormats/AstcCpuDecompressor.h:18:1:
note: 'uint32_t' is defined in header '<cstdint>'; this is probably
fixable by adding '#include <cstdint>'
   17 | #include <string>
  +++ |+#include <cstdint>
   18 |
../host/compressedTextureFormats/AstcCpuDecompressorNoOp.cpp:25:43:
error: 'uint32_t' has not been declared
   25 |     int32_t decompress(uint32_t imgWidth, uint32_t imgHeight, uint32_t blockWidth,
      |                                           ^~~~~~~~
../host/compressedTextureFormats/AstcCpuDecompressorNoOp.cpp:25:43:
note: 'uint32_t' is defined in header '<cstdint>'; this is probably
fixable by adding '#include <cstdint>'
```
This commit is contained in:
ghpzin
2025-12-02 08:27:58 +03:00
parent 974707f1fe
commit 0bdff8af0d
2 changed files with 54 additions and 0 deletions
@@ -0,0 +1,49 @@
diff --git a/host/BorrowedImage.h b/host/BorrowedImage.h
index ed2890568..51ea2b6b1 100644
--- a/host/BorrowedImage.h
+++ b/host/BorrowedImage.h
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <cstdint>
#pragma once
namespace gfxstream {
diff --git a/host/compressedTextureFormats/AstcCpuDecompressor.h b/host/compressedTextureFormats/AstcCpuDecompressor.h
index 4823ee255..3af0bdc64 100644
--- a/host/compressedTextureFormats/AstcCpuDecompressor.h
+++ b/host/compressedTextureFormats/AstcCpuDecompressor.h
@@ -15,6 +15,7 @@
#include <memory>
#include <string>
+#include <cstdint>
namespace gfxstream {
namespace vk {
diff --git a/host/magma/DrmContext.h b/host/magma/DrmContext.h
index db3ef45e4..5030c7dd6 100644
--- a/host/magma/DrmContext.h
+++ b/host/magma/DrmContext.h
@@ -16,6 +16,7 @@
#include <memory>
#include <optional>
+#include <cstdint>
#include "aemu/base/Compiler.h"
diff --git a/host/vulkan/BufferVk.h b/host/vulkan/BufferVk.h
index 9016fd745..a8a3fe3eb 100644
--- a/host/vulkan/BufferVk.h
+++ b/host/vulkan/BufferVk.h
@@ -14,6 +14,7 @@
#include <memory>
#include <vector>
+#include <cstdint>
namespace gfxstream {
namespace vk {
+5
View File
@@ -25,6 +25,11 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-AN6OpZQ2te4iVuh/kFHXzmLAWIMyuoj9FHTVicnbiPw=";
};
patches = [
# Fix build with gcc15
./gfxstream-add-include-cstdint.patch
];
# Ensure that meson can find an Objective-C compiler on Darwin.
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace meson.build \