libodfgen: fix build with gcc15

- add patch that adds `#include <cstdint>` to `OdfGenerator.cxx`,
based on upstream commit that is not included in tagged versions:
https://sourceforge.net/p/libwpd/libodfgen/ci/4da0b148def5b40ee60d4cd79762c0f158d64cc7/

Fixes build failure with gcc15:
```
OdfGenerator.cxx:53:9: error: 'uint8_t' was not declared in this scope
   53 |         uint8_t first;
      |         ^~~~~~~
OdfGenerator.cxx:45:1: note: 'uint8_t' is defined in header '<cstdint>';
this is probably fixable by adding '#include <cstdint>'
   44 | #include "GraphicFunctions.hxx"
  +++ |+#include <cstdint>
   45 | #include "InternalHandler.hxx"
OdfGenerator.cxx:57:17: error: 'first' was not declared in this scope
   57 |                 first = 0;
      |                 ^~~~~
```
This commit is contained in:
ghpzin
2025-09-25 23:41:19 +03:00
parent a96787cf89
commit a336da9b6c
2 changed files with 18 additions and 0 deletions
@@ -0,0 +1,12 @@
diff --git a/src/OdfGenerator.cxx b/src/OdfGenerator.cxx
index adf176b0a4..79de4dd2b7 100644
--- a/src/OdfGenerator.cxx
+++ b/src/OdfGenerator.cxx
@@ -33,6 +33,7 @@
#include <math.h>
#include <cctype>
+#include <cstdint>
#include <limits>
#include <string>
#include <stack>
+6
View File
@@ -20,6 +20,12 @@ stdenv.mkDerivation rec {
sha256 = "sha256-Mj5JH5VsjKKrsSyZjjUGcJMKMjF7+WYrBhXdSzkiuDE=";
};
patches = [
# Fix build with gcc15, based on:
# https://sourceforge.net/p/libwpd/libodfgen/ci/4da0b148def5b40ee60d4cd79762c0f158d64cc7/
./libodfgen-add-include-cstdint-gcc15.patch
];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
boost