# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/pdisk/hotfix.patch # Copyright (C) 2004 - 2025 The T2 SDE Project # Copyright (C) 1998 - 2003 ROCK Linux Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- --- pdisk-pdisk-10/cmdline.c.vanilla 2025-06-28 18:27:06.020747901 +0200 +++ pdisk-pdisk-10/cmdline.c 2025-06-28 18:27:15.663957533 +0200 @@ -22,10 +22,8 @@ * @APPLE_LICENSE_HEADER_END@ */ #include -#ifndef __linux__ #include #include -#endif #include #include #include --- pdisk-pdisk-10/cvt_pt.c.vanilla 2025-06-28 18:17:40.137408623 +0200 +++ pdisk-pdisk-10/cvt_pt.c 2025-06-28 18:17:46.604853864 +0200 @@ -173,7 +173,7 @@ } // 2) open prefix of filename as partition map - map = open_partition_map(s, &valid_file, 0); + map = open_partition_map(s, &valid_file, 0, 0); if (!valid_file) { fatal(-1, "%s does not have a partition map", s); return; --- pdisk-pdisk-10/errors.c.vanilla 2025-06-28 18:16:00.487148991 +0200 +++ pdisk-pdisk-10/errors.c 2025-06-28 18:21:42.040851124 +0200 @@ -30,9 +30,7 @@ #include // for exit() -#ifndef __linux__ #include -#endif // for strrchr #include @@ -68,6 +66,10 @@ extern const char * const sys_errlist[]; #endif +#define sys_nerr errno + +void do_command_help(); +int do_command_line(int argc, char * argv[]); // // Forward declarations --- ./errors.c 2000-05-16 09:10:57.000000000 -0500 +++ ./errors.c 2002-12-19 20:51:14.000000000 -0500 @@ -134,7 +137,7 @@ #if defined(__linux__) || defined(NeXT) || defined(__unix__) if (value > 0 && value < sys_nerr) { - fprintf(stderr, " (%s)\n", sys_errlist[value]); + fprintf(stderr, " (%s)\n", strerror(value)); } else { fprintf(stderr, "\n"); } @@ -163,7 +166,7 @@ #if defined(__linux__) || defined(NeXT) || defined(__unix__) if (value > 0 && value < sys_nerr) { - fprintf(stderr, " (%s)\n", sys_errlist[value]); + fprintf(stderr, " (%s)\n", strerror(value)); } else { fprintf(stderr, "\n"); } --- ./file_media.c 2000-05-16 09:10:55.000000000 -0500 +++ ./file_media.c 2002-12-19 20:48:18.000000000 -0500 @@ -58,6 +58,7 @@ * Defines */ #ifdef __linux__ +#define llseek lseek64 #define LOFF_MAX 9223372036854775807LL extern __loff_t llseek __P ((int __fd, __loff_t __offset, int __whence)); #else