* updated krdc (21.12.1 -> 21.12.2), untested
[t2-trunk.git] / package / powerpc / mac-fdisk / no-sys_errlist.patch
blob5b7a1679880e9e220d3563875cf8f7d5a7d49883
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../mac-fdisk/no-sys_errlist.patch
5 # Copyright (C) 2020 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 --- mac-fdisk-0.1.orig/errors.c.vanilla 2020-10-28 16:14:27.886528904 +0100
18 +++ mac-fdisk-0.1.orig/errors.c 2020-10-28 16:15:59.270527821 +0100
19 @@ -115,11 +115,7 @@
20 va_end(ap);
22 #ifdef __linux__
23 - if (value > 0 && value < sys_nerr) {
24 - fprintf(stderr, " (%s)\n", sys_errlist[value]);
25 - } else {
26 - fprintf(stderr, "\n");
27 - }
28 + fprintf(stderr, " (%s)\n", strerror(value));
29 #else
30 fprintf(stderr, "\n");
31 #endif
32 @@ -144,11 +140,7 @@
33 va_end(ap);
35 #ifdef __linux__
36 - if (value > 0 && value < sys_nerr) {
37 - fprintf(stderr, " (%s)\n", sys_errlist[value]);
38 - } else {
39 - fprintf(stderr, "\n");
40 - }
41 + fprintf(stderr, " (%s)\n", strerror(value));
42 #else
43 fprintf(stderr, "\n");
44 #endif