# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/mac-fdisk/hotfix-no-sys_errlist.patch # Copyright (C) 2020 - 2022 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # 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 version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- mac-fdisk-0.1.orig/errors.c.vanilla 2020-10-28 16:14:27.886528904 +0100 +++ mac-fdisk-0.1.orig/errors.c 2020-10-28 16:15:59.270527821 +0100 @@ -115,11 +115,7 @@ va_end(ap); #ifdef __linux__ - if (value > 0 && value < sys_nerr) { - fprintf(stderr, " (%s)\n", sys_errlist[value]); - } else { - fprintf(stderr, "\n"); - } + fprintf(stderr, " (%s)\n", strerror(value)); #else fprintf(stderr, "\n"); #endif @@ -144,11 +140,7 @@ va_end(ap); #ifdef __linux__ - if (value > 0 && value < sys_nerr) { - fprintf(stderr, " (%s)\n", sys_errlist[value]); - } else { - fprintf(stderr, "\n"); - } + fprintf(stderr, " (%s)\n", strerror(value)); #else fprintf(stderr, "\n"); #endif