gptfdisk: fix runtime problems with popt 1.19

This commit is contained in:
Yureka 2022-10-16 12:19:32 +02:00 committed by ehmry
parent 7a3a8cb235
commit 3ec8d0d558
2 changed files with 18 additions and 0 deletions

View File

@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
};
patches = [
# issues with popt 1.19 (from upstream but not yet released):
# https://sourceforge.net/p/gptfdisk/code/ci/5d5e76d369a412bfb3d2cebb5fc0a7509cef878d/
# https://github.com/rpm-software-management/popt/issues/80
./popt-1-19.patch
# fix UUID generation (from upstream but not yet released):
# https://sourceforge.net/p/gptfdisk/code/ci/6a8416cbd12d55f882bb751993b94f72d338d96f/
# https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1853985.html

View File

@ -0,0 +1,13 @@
diff --git a/gptcl.cc b/gptcl.cc
index 34c9421..0d578eb 100644
--- a/gptcl.cc
+++ b/gptcl.cc
@@ -155,7 +155,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
} // while
// Assume first non-option argument is the device filename....
- device = (char*) poptGetArg(poptCon);
+ device = strdup((char*) poptGetArg(poptCon));
poptResetContext(poptCon);
if (device != NULL) {