qi: doc: added 'Order files' section to the manual
[dragora.git] / patches / util-linux / util-linux.patch
blobf4a2315b71de624cfe5f46d4a3f4e5d2d900aeb0
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];
9 -__sighandler_t old_SIGINT, old_SIGTERM;
10 +sighandler_t old_SIGINT, old_SIGTERM;
12 int arrow_cursor = FALSE;
13 int display_units = MEGABYTES;
14 diff -aur util-linux-2.23.1.org/fdisks/fdisksunlabel.c util-linux-2.23.1/fdisks/fdisksunlabel.c
15 --- util-linux-2.23.1.org/fdisks/fdisksunlabel.c 2013-07-01 21:37:58.508000002 +0000
16 +++ util-linux-2.23.1/fdisks/fdisksunlabel.c 2013-07-01 21:59:43.721000002 +0000
17 @@ -383,9 +383,11 @@
21 -static int verify_sun_cmp(int *a, int *b, void *data)
22 +static void* cmp_data;
23 +static int verify_sun_cmp(const void *pa, const void *pb)
25 - unsigned int *verify_sun_starts = (unsigned int *) data;
26 + const int *a = pa, *b = pb;
27 + unsigned int *verify_sun_starts = (unsigned int *) cmp_data;
29 if (*a == -1)
30 return 1;
31 @@ -449,9 +451,8 @@
32 else
33 array[i] = -1;
35 - qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
36 - (int (*)(const void *,const void *,void *)) verify_sun_cmp,
37 - verify_sun_starts);
38 + cmp_data = verify_sun_starts;
39 + qsort(array,ARRAY_SIZE(array),sizeof(array[0]), verify_sun_cmp);
41 if (array[0] == -1) {
42 fdisk_info(cxt, _("No partitions defined"));
43 diff -aur util-linux-2.23.1.org/include/ttyutils.h util-linux-2.23.1/include/ttyutils.h
44 --- util-linux-2.23.1.org/include/ttyutils.h 2013-05-27 10:45:06.000000000 -0300
45 +++ util-linux-2.23.1/include/ttyutils.h 2013-07-05 12:19:54.000000000 -0300
46 @@ -10,6 +10,7 @@
47 #include <stdlib.h>
48 #include <termios.h>
49 #include <limits.h>
50 +#include <sys/ttydefaults.h>
51 #ifdef HAVE_SYS_IOCTL_H
52 #include <sys/ioctl.h>
53 #endif
54 diff -aur util-linux-2.23.1.org/term-utils/setterm.c util-linux-2.23.1/term-utils/setterm.c
55 --- util-linux-2.23.1.org/term-utils/setterm.c 2013-07-01 21:37:58.442000002 +0000
56 +++ util-linux-2.23.1/term-utils/setterm.c 2013-07-01 22:02:54.244000002 +0000
57 @@ -123,7 +123,7 @@
58 #include "nls.h"
59 #include "closestream.h"
61 -#if __GNU_LIBRARY__ < 5
62 +#if defined(__GLIBC__) && __GNU_LIBRARY__ < 5
63 #ifndef __alpha__
64 # include <linux/unistd.h>
65 #define __NR_klogctl __NR_syslog
66 diff -aur util-linux-2.23.1.org/term-utils/ttymsg.c util-linux-2.23.1/term-utils/ttymsg.c
67 --- util-linux-2.23.1.org/term-utils/ttymsg.c 2013-07-01 21:37:58.442000002 +0000
68 +++ util-linux-2.23.1/term-utils/ttymsg.c 2013-07-01 22:07:02.788000002 +0000
69 @@ -41,6 +41,7 @@
72 #include <sys/types.h>
73 +#include <sys/param.h>
74 #include <sys/uio.h>
75 #include <signal.h>
76 #include <fcntl.h>
77 diff -aur util-linux-2.23.1.org/text-utils/hexdump.h util-linux-2.23.1/text-utils/hexdump.h
78 --- util-linux-2.23.1.org/text-utils/hexdump.h 2013-07-01 21:37:58.437000002 +0000
79 +++ util-linux-2.23.1/text-utils/hexdump.h 2013-07-01 22:01:27.005000002 +0000
80 @@ -32,7 +32,7 @@
82 * @(#)hexdump.h 5.4 (Berkeley) 6/1/90
85 +#include <sys/types.h>
86 typedef struct _pr {
87 struct _pr *nextpr; /* next print unit */
88 #define F_ADDRESS 0x001 /* print offset */
89 diff -aur util-linux-2.23.1.org/text-utils/pg.c util-linux-2.23.1/text-utils/pg.c
90 --- util-linux-2.23.1.org/text-utils/pg.c 2013-07-01 21:37:58.437000002 +0000
91 +++ util-linux-2.23.1/text-utils/pg.c 2013-07-01 22:01:55.831000002 +0000
92 @@ -37,7 +37,7 @@
93 #ifndef TIOCGWINSZ
94 # include <sys/ioctl.h>
95 #endif
96 -#include <sys/termios.h>
97 +#include <termios.h>
98 #include <fcntl.h>
99 #include <regex.h>
100 #include <stdio.h>