0001-src-compressor.h-fix-build-with-gcc-13.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 8db993c32f97188bdd6de4b2aa177fc513ee7e9f Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 15 Oct 2023 21:22:58 +0200
  4. Subject: [PATCH] src/compressor.h: fix build with gcc >= 13
  5. Fix the following build failure with gcc >= 13:
  6. In file included from ../src/compressor.c:3:
  7. ../src/compressor.h:59:59: error: unknown type name 'size_t'
  8. 59 | int compressor_input(CompressorContext *c, const void *p, size_t sz);
  9. | ^~~~~~
  10. ../src/compressor.h:19:1: note: 'size_t' is defined in header '<stddef.h>'; did you forget to '#include <stddef.h>'?
  11. 18 | #include "cacompression.h"
  12. +++ |+#include <stddef.h>
  13. 19 |
  14. Fixes:
  15. - http://autobuild.buildroot.org/results/ab08f3b90d253db45643dd058b80ae1dd5f49d0f
  16. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  17. Upstream: https://github.com/systemd/casync/pull/270
  18. ---
  19. src/compressor.h | 1 +
  20. 1 file changed, 1 insertion(+)
  21. diff --git a/src/compressor.h b/src/compressor.h
  22. index 2c9f93b..ae2eb30 100644
  23. --- a/src/compressor.h
  24. +++ b/src/compressor.h
  25. @@ -4,6 +4,7 @@
  26. #define foocompresshorhfoo
  27. #include <stdbool.h>
  28. +#include <stddef.h>
  29. #if HAVE_LIBLZMA
  30. # include <lzma.h>
  31. --
  32. 2.42.0