gpm-1.20.7-glibc_2.26-1.patch 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Submitted by: Pierre Labastie <pierre dot labastie at neuf dot fr>
  2. Date: 2017-08-17
  3. Initial Package Version: 1.20.7
  4. Origin: Nutyx
  5. Upstream Status: There are PRs, but nothing committed yet
  6. Description: Fix build failures introduced by glibc-2.26
  7. diff -Naur gpm-1.20.7-orig/src/daemon/open_console.c gpm-1.20.7/src/daemon/open_console.c
  8. --- gpm-1.20.7-orig/src/daemon/open_console.c 2012-10-26 21:21:38.000000000 +0000
  9. +++ gpm-1.20.7/src/daemon/open_console.c 2017-08-08 17:58:15.176232558 +0000
  10. @@ -23,6 +23,10 @@
  11. #include <sys/stat.h> /* stat() */
  12. #include <sys/ioctl.h> /* ioctl */
  13. +#ifdef HAVE_SYS_SYSMACROS_H
  14. +#include <sys/sysmacros.h> /* major() w/newer glibc */
  15. +#endif
  16. +
  17. /* Linux specific (to be outsourced in gpm2 */
  18. #include <linux/serial.h> /* for serial console check */
  19. #include <asm/ioctls.h> /* for serial console check */
  20. diff -Naur gpm-1.20.7-orig/src/prog/gpm-root.y gpm-1.20.7/src/prog/gpm-root.y
  21. --- gpm-1.20.7-orig/src/prog/gpm-root.y 2012-10-26 21:21:38.000000000 +0000
  22. +++ gpm-1.20.7/src/prog/gpm-root.y 2017-08-08 18:00:36.442898559 +0000
  23. @@ -443,6 +443,7 @@
  24. }
  25. /*---------------------------------------------------------------------*/
  26. +#if 0
  27. static int f_debug_one(FILE *f, Draw *draw)
  28. {
  29. DrawItem *ip;
  30. @@ -465,6 +466,7 @@
  31. #undef LINE
  32. return 0;
  33. }
  34. +#endif
  35. int f_debug(int mode, DrawItem *self, int uid)
  36. {
  37. @@ -960,10 +962,8 @@
  38. /*------------*/
  39. static inline void scr_restore(int fd, FILE *f, unsigned char *buffer, int vc)
  40. {
  41. - int x,y, dumpfd;
  42. + int dumpfd;
  43. char dumpname[20];
  44. -
  45. - x=buffer[2]; y=buffer[3];
  46. /* WILL NOT WORK WITH DEVFS! FIXME! */
  47. sprintf(dumpname,"/dev/vcsa%i",vc);
  48. @@ -1196,11 +1196,7 @@
  49. LOG_DAEMON : LOG_USER);
  50. /* reap your zombies */
  51. childaction.sa_handler=reap_children;
  52. -#if defined(__GLIBC__)
  53. - __sigemptyset(&childaction.sa_mask);
  54. -#else /* __GLIBC__ */
  55. - childaction.sa_mask=0;
  56. -#endif /* __GLIBC__ */
  57. + sigemptyset(&childaction.sa_mask);
  58. childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */
  59. sigaction(SIGCHLD,&childaction,NULL);