0001-add-missing-cstdint-include.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From 3c441910aa25f57df2a4db55f75f5d99cea86620 Mon Sep 17 00:00:00 2001
  2. From: Sergei Trofimovich <slyich@gmail.com>
  3. Date: Sun, 8 Jan 2023 18:24:53 +0000
  4. Subject: [PATCH] add missing <cstdint> include
  5. Upcoming `gcc-13` made `<string>` leaner and does not include `<cstdint>`
  6. implicitly anymore. As a result build fails without the change as:
  7. [ 2%] Building CXX object CMakeFiles/wayland-scanner++.dir/scanner/scanner.cpp.o
  8. scanner/scanner.cpp:378:3: error: 'uint32_t' does not name a type
  9. 378 | uint32_t width = 0;
  10. | ^~~~~~~~
  11. Upstream: https://github.com/NilsBrause/waylandpp/pull/71
  12. Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
  13. ---
  14. include/wayland-client.hpp | 1 +
  15. scanner/scanner.cpp | 3 +++
  16. 2 files changed, 4 insertions(+)
  17. diff --git a/include/wayland-client.hpp b/include/wayland-client.hpp
  18. index a3f782b..4598a0e 100644
  19. --- a/include/wayland-client.hpp
  20. +++ b/include/wayland-client.hpp
  21. @@ -29,6 +29,7 @@
  22. /** \file */
  23. #include <atomic>
  24. +#include <cstdint>
  25. #include <functional>
  26. #include <memory>
  27. #include <string>
  28. diff --git a/scanner/scanner.cpp b/scanner/scanner.cpp
  29. index bebd71e..37cf7ff 100644
  30. --- a/scanner/scanner.cpp
  31. +++ b/scanner/scanner.cpp
  32. @@ -23,6 +23,7 @@
  33. #include <vector>
  34. #include <cctype>
  35. #include <cmath>
  36. +#include <cstdint>
  37. #include <stdexcept>
  38. #include "pugixml.hpp"
  39. @@ -1106,6 +1107,7 @@ int main(int argc, char *argv[])
  40. wayland_hpp << "#pragma once" << std::endl
  41. << std::endl
  42. << "#include <array>" << std::endl
  43. + << "#include <cstdint>" << std::endl
  44. << "#include <functional>" << std::endl
  45. << "#include <memory>" << std::endl
  46. << "#include <string>" << std::endl
  47. @@ -1125,6 +1127,7 @@ int main(int argc, char *argv[])
  48. wayland_server_hpp << "#pragma once" << std::endl
  49. << std::endl
  50. << "#include <array>" << std::endl
  51. + << "#include <cstdint>" << std::endl
  52. << "#include <functional>" << std::endl
  53. << "#include <memory>" << std::endl
  54. << "#include <string>" << std::endl