0001-Added-musl-support-to-libgpm-and-the-daemon.patch 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. From eb0e14f8a5c414603b2e882df54b9fec138104ec Mon Sep 17 00:00:00 2001
  2. From: Dima Krasner <dima@dimakrasner.com>
  3. Date: Wed, 12 Nov 2014 23:06:46 +0200
  4. Subject: [PATCH] Added musl support to libgpm and the daemon.
  5. [Upstream patch backported from the github repository,
  6. https://github.com/telmich/gpm/commit/d88fb1de5803c366ab62f7de9ee5d83207fb2afe.]
  7. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  8. ---
  9. src/daemon/open_console.c | 1 +
  10. src/prog/display-buttons.c | 1 +
  11. src/prog/display-coords.c | 1 +
  12. src/prog/gpm-root.y | 4 ++--
  13. 4 files changed, 5 insertions(+), 2 deletions(-)
  14. diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c
  15. index 98297c9..4d6c0af 100644
  16. --- a/src/daemon/open_console.c
  17. +++ b/src/daemon/open_console.c
  18. @@ -21,6 +21,7 @@
  19. #include <fcntl.h> /* open and co. */
  20. #include <sys/stat.h> /* stat() */
  21. +#include <sys/types.h> /* major() */
  22. #include <sys/ioctl.h> /* ioctl */
  23. /* Linux specific (to be outsourced in gpm2 */
  24. diff --git a/src/prog/display-buttons.c b/src/prog/display-buttons.c
  25. index de8e5b2..38d2f11 100644
  26. --- a/src/prog/display-buttons.c
  27. +++ b/src/prog/display-buttons.c
  28. @@ -36,6 +36,7 @@
  29. #include <stdio.h> /* printf() */
  30. #include <time.h> /* time() */
  31. #include <errno.h> /* errno */
  32. +#include <sys/select.h> /* fd_set and FD_* */
  33. #include <gpm.h> /* gpm information */
  34. /* display resulting data */
  35. diff --git a/src/prog/display-coords.c b/src/prog/display-coords.c
  36. index ed15c8a..411283a 100644
  37. --- a/src/prog/display-coords.c
  38. +++ b/src/prog/display-coords.c
  39. @@ -37,6 +37,7 @@
  40. #include <stdio.h> /* printf() */
  41. #include <time.h> /* time() */
  42. #include <errno.h> /* errno */
  43. +#include <sys/select.h> /* fd_set and FD_* */
  44. #include <gpm.h> /* gpm information */
  45. /* display resulting data */
  46. diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y
  47. index 069d801..188ae35 100644
  48. --- a/src/prog/gpm-root.y
  49. +++ b/src/prog/gpm-root.y
  50. @@ -1199,9 +1199,9 @@ int main(int argc, char **argv)
  51. #if defined(__GLIBC__)
  52. __sigemptyset(&childaction.sa_mask);
  53. #else /* __GLIBC__ */
  54. - childaction.sa_mask=0;
  55. + sigemptyset(&childaction.sa_mask);
  56. #endif /* __GLIBC__ */
  57. - childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
  58. + childaction.sa_flags=0;
  59. sigaction(SIGCHLD,&childaction,NULL);
  60. /*....................................... Connect and get your buffer */
  61. --
  62. 2.1.0