0001-fbio.cpp-improxy.cpp-fbterm.cpp-fix-musl-compile.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. From 1072d60c6c8f1f51feb740527a8a056bfead9318 Mon Sep 17 00:00:00 2001
  2. From: Peter Seiderer <ps.report@gmx.net>
  3. Date: Thu, 8 Oct 2015 19:53:47 +0200
  4. Subject: [PATCH] fbio.cpp, improxy.cpp, fbterm.cpp: fix musl compile
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. - add missing include, fixes:
  9. fbio.cpp:33:8: error: ‘fd_set’ does not name a type
  10. static fd_set fds;
  11. improxy.cpp:439:3: error: ‘fd_set’ was not declared in this scope
  12. - add missing WAIT_ANY define, fixes:
  13. fbterm.cpp: In member function ‘void FbTerm::processSignal(u32)’:
  14. fbterm.cpp:212:22: error: ‘WAIT_ANY’ was not declared in this scope
  15. s32 pid = waitpid(WAIT_ANY, 0, WNOHANG);
  16. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  17. ---
  18. src/fbio.cpp | 1 +
  19. src/fbterm.cpp | 4 ++++
  20. src/improxy.cpp | 1 +
  21. 3 files changed, 6 insertions(+)
  22. diff --git a/src/fbio.cpp b/src/fbio.cpp
  23. index e5afc44..88c632c 100644
  24. --- a/src/fbio.cpp
  25. +++ b/src/fbio.cpp
  26. @@ -30,6 +30,7 @@
  27. #define NR_EPOLL_FDS 10
  28. s32 epollFd;
  29. #else
  30. +#include <sys/select.h>
  31. static fd_set fds;
  32. static u32 maxfd = 0;
  33. #endif
  34. diff --git a/src/fbterm.cpp b/src/fbterm.cpp
  35. index 38d4014..60288e4 100644
  36. --- a/src/fbterm.cpp
  37. +++ b/src/fbterm.cpp
  38. @@ -37,6 +37,10 @@
  39. #include "input_key.h"
  40. #include "mouse.h"
  41. +#ifndef WAIT_ANY
  42. +#define WAIT_ANY (-1)
  43. +#endif
  44. +
  45. #ifdef HAVE_SIGNALFD
  46. // <sys/signalfd.h> offered by some systems has bug with g++
  47. #include "signalfd.h"
  48. diff --git a/src/improxy.cpp b/src/improxy.cpp
  49. index 3d03e66..4e046d2 100644
  50. --- a/src/improxy.cpp
  51. +++ b/src/improxy.cpp
  52. @@ -23,6 +23,7 @@
  53. #include <stdio.h>
  54. #include <string.h>
  55. #include <errno.h>
  56. +#include <sys/select.h>
  57. #include <sys/socket.h>
  58. #include "improxy.h"
  59. #include "immessage.h"
  60. --
  61. 2.1.4