aboutsummaryrefslogtreecommitdiffstats
path: root/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-10-26 14:55:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-10-26 14:57:20 +0000
commitccc967e0f3d093a3fbaf9ad3cd5451d71fd0d9ec (patch)
tree3286c7d29a24e3b04025f47711b852ed9f865158 /community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch
parent5a5dd7f7e5c96b007cf6bb03aeaa1d117feacef2 (diff)
downloadaports-ccc967e0f3d093a3fbaf9ad3cd5451d71fd0d9ec.tar.bz2
aports-ccc967e0f3d093a3fbaf9ad3cd5451d71fd0d9ec.tar.xz
community/lastpass-cli: fix tests on various architectures
upstream report: https://github.com/lastpass/lastpass-cli/issues/345
Diffstat (limited to 'community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch')
-rw-r--r--community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch b/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch
new file mode 100644
index 0000000000..6cc03a787f
--- /dev/null
+++ b/community/lastpass-cli/0001-generate-fix-type-for-option-parsing.patch
@@ -0,0 +1,35 @@
+From d170eb7809501ef16108c27be24ba4ab5797a9c3 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 26 Oct 2017 14:49:07 +0000
+Subject: [PATCH] generate: fix type for option parsing
+
+char may or may not be signed depending on architecture. If char is
+unsigned on a given architecture, then will the testing the return value
+from getopt_long (which is int) always fail. This happened on some
+architectures like ppc64le, aarch64 and s390x.
+
+To fix this we use same type as getopt_long return value: int.
+
+fixes #345
+
+Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
+---
+ cmd-generate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmd-generate.c b/cmd-generate.c
+index ce16c25..9eff89a 100644
+--- a/cmd-generate.c
++++ b/cmd-generate.c
+@@ -61,7 +61,7 @@ int cmd_generate(int argc, char **argv)
+ {"clip", no_argument, NULL, 'c'},
+ {0, 0, 0, 0}
+ };
+- char option;
++ int option;
+ int option_index;
+ char *username = NULL;
+ char *url = NULL;
+--
+2.14.3
+