0001-Add-W_EXITCODE-macro-for-non-glibc-systems.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From de9639baac792327c701e509258b8a13f6959e82 Mon Sep 17 00:00:00 2001
  2. From: Danilo Spinella <danyspin97@protonmail.com>
  3. Date: Thu, 21 Mar 2019 14:19:26 +0100
  4. Subject: [PATCH] Add W_EXITCODE macro for non-glibc systems
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Upstream-Status: Submitted [1]
  9. Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
  10. [1] https://gitlab.gnome.org/GNOME/vte/issues/72
  11. ---
  12. src/missing.hh | 4 ++++
  13. src/widget.cc | 1 +
  14. 2 files changed, 5 insertions(+)
  15. diff --git a/src/missing.hh b/src/missing.hh
  16. index 0742270..30ede62 100644
  17. --- a/src/missing.hh
  18. +++ b/src/missing.hh
  19. @@ -33,3 +33,7 @@ int fdwalk(int (*cb)(void* data, int fd),
  20. char* strchrnul(char const* s,
  21. int c);
  22. #endif
  23. +
  24. +#ifndef W_EXITCODE
  25. +#define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
  26. +#endif
  27. diff --git a/src/widget.cc b/src/widget.cc
  28. index 44a2271..0668735 100644
  29. --- a/src/widget.cc
  30. +++ b/src/widget.cc
  31. @@ -21,6 +21,7 @@
  32. #include "widget.hh"
  33. #include <sys/wait.h> // for W_EXITCODE
  34. +#include "missing.hh" // for W_EXITCODE on non-glibc systems
  35. #include <exception>
  36. #include <new>