1 From 5d5e76d369a412bfb3d2cebb5fc0a7509cef878d Mon Sep 17 00:00:00 2001
2 From: Rod Smith <rodsmith@rodsbooks.com>
3 Date: Fri, 15 Apr 2022 18:10:14 -0400
4 Subject: [PATCH] Fix failure & crash of sgdisk when compiled with latest popt
5 (commit 740; presumably eventually release 1.19)
10 2 files changed, 2 insertions(+), 2 deletions(-)
12 diff --git a/gptcl.cc b/gptcl.cc
13 index 34c9421..0d578eb 100644
16 @@ -155,7 +155,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
19 // Assume first non-option argument is the device filename....
20 - device = (char*) poptGetArg(poptCon);
21 + device = strdup((char*) poptGetArg(poptCon));
22 poptResetContext(poptCon);
25 diff --git a/support.h b/support.h
26 index 8ba9ad1..f91f1bc 100644
33 -#define GPTFDISK_VERSION "1.0.9"
34 +#define GPTFDISK_VERSION "1.0.9.1"
36 #if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
37 // Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64