Christian Wiese
11 years ago
1 changed files with 88 additions and 0 deletions
@ -0,0 +1,88 @@
|
||||
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||
#
|
||||
# Filename: package/.../musl/pkg/util-linux/util-linux-musl.patch
|
||||
# Copyright (C) 2014 The OpenSDE Project
|
||||
#
|
||||
# More information can be found in the files COPYING and README.
|
||||
#
|
||||
# This patch file is dual-licensed. It is available under the license the
|
||||
# patched project is licensed under, as long as it is an OpenSource license
|
||||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||
# of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
# --- SDE-COPYRIGHT-NOTE-END ---
|
||||
|
||||
Original patch taken from sabotage linux
|
||||
|
||||
https://github.com/sabotage-linux/sabotage
|
||||
|
||||
and adjusted for OpenSDE (http://opensde.org/)
|
||||
to apply on top of util-linux 2.24
|
||||
|
||||
diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c
|
||||
index d5a0af2..61bcf58 100644
|
||||
--- a/libfdisk/src/sun.c
|
||||
+++ b/libfdisk/src/sun.c
|
||||
@@ -361,9 +361,11 @@ static void fetch_sun(struct fdisk_context *cxt,
|
||||
}
|
||||
}
|
||||
|
||||
-static int verify_sun_cmp(int *a, int *b, void *data)
|
||||
+static void* cmp_data;
|
||||
+static int verify_sun_cmp(const void *pa, const void *pb)
|
||||
{
|
||||
- unsigned int *verify_sun_starts = (unsigned int *) data;
|
||||
+ const int *a = pa, *b = pb;
|
||||
+ unsigned int *verify_sun_starts = (unsigned int *) cmp_data;
|
||||
|
||||
if (*a == -1)
|
||||
return 1;
|
||||
@@ -427,9 +429,8 @@ static int sun_verify_disklabel(struct fdisk_context *cxt)
|
||||
else
|
||||
array[i] = -1;
|
||||
}
|
||||
- qsort_r(array,ARRAY_SIZE(array),sizeof(array[0]),
|
||||
- (int (*)(const void *,const void *,void *)) verify_sun_cmp,
|
||||
- verify_sun_starts);
|
||||
+ cmp_data = verify_sun_starts;
|
||||
+ qsort(array,ARRAY_SIZE(array),sizeof(array[0]), verify_sun_cmp);
|
||||
|
||||
if (array[0] == -1) {
|
||||
fdisk_info(cxt, _("No partitions defined."));
|
||||
diff -aur util-linux-2.23.1.org/include/ttyutils.h util-linux-2.23.1/include/ttyutils.h
|
||||
--- util-linux-2.23.1.org/include/ttyutils.h 2013-07-01 21:37:58.433000002 +0000
|
||||
+++ util-linux-2.23.1/include/ttyutils.h 2013-07-01 21:48:42.328000002 +0000
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <termios.h>
|
||||
#include <limits.h>
|
||||
+#include <sys/ttydefaults.h>
|
||||
#ifdef HAVE_SYS_IOCTL_H
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
diff -aur util-linux-2.23.1.org/text-utils/hexdump.h util-linux-2.23.1/text-utils/hexdump.h
|
||||
--- util-linux-2.23.1.org/text-utils/hexdump.h 2013-07-01 21:37:58.437000002 +0000
|
||||
+++ util-linux-2.23.1/text-utils/hexdump.h 2013-07-01 22:01:27.005000002 +0000
|
||||
@@ -32,7 +32,7 @@
|
||||
*
|
||||
* @(#)hexdump.h 5.4 (Berkeley) 6/1/90
|
||||
*/
|
||||
-
|
||||
+#include <sys/types.h>
|
||||
typedef struct _pr {
|
||||
struct _pr *nextpr; /* next print unit */
|
||||
#define F_ADDRESS 0x001 /* print offset */
|
||||
diff -aur util-linux-2.23.1.org/text-utils/pg.c util-linux-2.23.1/text-utils/pg.c
|
||||
--- util-linux-2.23.1.org/text-utils/pg.c 2013-07-01 21:37:58.437000002 +0000
|
||||
+++ util-linux-2.23.1/text-utils/pg.c 2013-07-01 22:01:55.831000002 +0000
|
||||
@@ -37,7 +37,7 @@
|
||||
#ifndef TIOCGWINSZ
|
||||
# include <sys/ioctl.h>
|
||||
#endif
|
||||
-#include <sys/termios.h>
|
||||
+#include <termios.h>
|
||||
#include <fcntl.h>
|
||||
#include <regex.h>
|
||||
#include <stdio.h>
|
Loading…
Reference in new issue