util-linux.patch 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. patch taken from sabotage linux -- https://github.com/rofl0r/sabotage
  2. diff -aur util-linux-2.23.1.org/fdisks/cfdisk.c util-linux-2.23.1/fdisks/cfdisk.c
  3. --- util-linux-2.23.1.org/fdisks/cfdisk.c 2013-07-01 21:37:58.508000002 +0000
  4. +++ util-linux-2.23.1/fdisks/cfdisk.c 2013-07-01 22:00:23.042000002 +0000
  5. @@ -325,7 +325,7 @@
  6. int logical = 0;
  7. long long logical_sectors[MAXIMUM_PARTS];
  8. -__sighandler_t old_SIGINT, old_SIGTERM;
  9. +sighandler_t old_SIGINT, old_SIGTERM;
  10. int arrow_cursor = FALSE;
  11. int display_units = MEGABYTES;
  12. diff -aur util-linux-2.23.1.org/fdisks/fdisksunlabel.c util-linux-2.23.1/fdisks/fdisksunlabel.c
  13. --- util-linux-2.23.1.org/fdisks/fdisksunlabel.c 2013-07-01 21:37:58.508000002 +0000
  14. +++ util-linux-2.23.1/fdisks/fdisksunlabel.c 2013-07-01 21:59:43.721000002 +0000
  15. @@ -383,9 +383,11 @@
  16. }
  17. }
  18. -static int verify_sun_cmp(int *a, int *b, void *data)
  19. +static void* cmp_data;
  20. +static int verify_sun_cmp(const void *pa, const void *pb)
  21. {
  22. - unsigned int *verify_sun_starts = (unsigned int *) data;
  23. + const int *a = pa, *b = pb;
  24. + unsigned int *verify_sun_starts = (unsigned int *) cmp_data;
  25. if (*a == -1)
  26. return 1;
  27. @@ -449,9 +451,8 @@
  28. else
  29. array[i] = -1;
  30. }
  31. - qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
  32. - (int (*)(const void *,const void *,void *)) verify_sun_cmp,
  33. - verify_sun_starts);
  34. + cmp_data = verify_sun_starts;
  35. + qsort(array,ARRAY_SIZE(array),sizeof(array[0]), verify_sun_cmp);
  36. if (array[0] == -1) {
  37. fdisk_info(cxt, _("No partitions defined"));
  38. diff -aur util-linux-2.23.1.org/include/ttyutils.h util-linux-2.23.1/include/ttyutils.h
  39. --- util-linux-2.23.1.org/include/ttyutils.h 2013-05-27 10:45:06.000000000 -0300
  40. +++ util-linux-2.23.1/include/ttyutils.h 2013-07-05 12:19:54.000000000 -0300
  41. @@ -10,6 +10,7 @@
  42. #include <stdlib.h>
  43. #include <termios.h>
  44. #include <limits.h>
  45. +#include <sys/ttydefaults.h>
  46. #ifdef HAVE_SYS_IOCTL_H
  47. #include <sys/ioctl.h>
  48. #endif
  49. diff -aur util-linux-2.23.1.org/term-utils/setterm.c util-linux-2.23.1/term-utils/setterm.c
  50. --- util-linux-2.23.1.org/term-utils/setterm.c 2013-07-01 21:37:58.442000002 +0000
  51. +++ util-linux-2.23.1/term-utils/setterm.c 2013-07-01 22:02:54.244000002 +0000
  52. @@ -123,7 +123,7 @@
  53. #include "nls.h"
  54. #include "closestream.h"
  55. -#if __GNU_LIBRARY__ < 5
  56. +#if defined(__GLIBC__) && __GNU_LIBRARY__ < 5
  57. #ifndef __alpha__
  58. # include <linux/unistd.h>
  59. #define __NR_klogctl __NR_syslog
  60. diff -aur util-linux-2.23.1.org/term-utils/ttymsg.c util-linux-2.23.1/term-utils/ttymsg.c
  61. --- util-linux-2.23.1.org/term-utils/ttymsg.c 2013-07-01 21:37:58.442000002 +0000
  62. +++ util-linux-2.23.1/term-utils/ttymsg.c 2013-07-01 22:07:02.788000002 +0000
  63. @@ -41,6 +41,7 @@
  64. */
  65. #include <sys/types.h>
  66. +#include <sys/param.h>
  67. #include <sys/uio.h>
  68. #include <signal.h>
  69. #include <fcntl.h>
  70. diff -aur util-linux-2.23.1.org/text-utils/hexdump.h util-linux-2.23.1/text-utils/hexdump.h
  71. --- util-linux-2.23.1.org/text-utils/hexdump.h 2013-07-01 21:37:58.437000002 +0000
  72. +++ util-linux-2.23.1/text-utils/hexdump.h 2013-07-01 22:01:27.005000002 +0000
  73. @@ -32,7 +32,7 @@
  74. *
  75. * @(#)hexdump.h 5.4 (Berkeley) 6/1/90
  76. */
  77. -
  78. +#include <sys/types.h>
  79. typedef struct _pr {
  80. struct _pr *nextpr; /* next print unit */
  81. #define F_ADDRESS 0x001 /* print offset */
  82. diff -aur util-linux-2.23.1.org/text-utils/pg.c util-linux-2.23.1/text-utils/pg.c
  83. --- util-linux-2.23.1.org/text-utils/pg.c 2013-07-01 21:37:58.437000002 +0000
  84. +++ util-linux-2.23.1/text-utils/pg.c 2013-07-01 22:01:55.831000002 +0000
  85. @@ -37,7 +37,7 @@
  86. #ifndef TIOCGWINSZ
  87. # include <sys/ioctl.h>
  88. #endif
  89. -#include <sys/termios.h>
  90. +#include <termios.h>
  91. #include <fcntl.h>
  92. #include <regex.h>
  93. #include <stdio.h>