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
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
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;
35 - qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
36 - (int (*)(const void *,const void *,void *)) verify_sun_cmp,
38 + cmp_data = verify_sun_starts;
39 + qsort(array,ARRAY_SIZE(array),sizeof(array[0]), verify_sun_cmp);
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
50 +#include <sys/ttydefaults.h>
51 #ifdef HAVE_SYS_IOCTL_H
52 #include <sys/ioctl.h>
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
59 #include "closestream.h"
61 -#if __GNU_LIBRARY__ < 5
62 +#if defined(__GLIBC__) && __GNU_LIBRARY__ < 5
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
72 #include <sys/types.h>
73 +#include <sys/param.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
82 * @(#)hexdump.h 5.4 (Berkeley) 6/1/90
85 +#include <sys/types.h>
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
94 # include <sys/ioctl.h>
96 -#include <sys/termios.h>