Skip to content
Snippets Groups Projects
Commit ae480751 authored by TBK's avatar TBK Committed by Ariadne Conill
Browse files

community/lastpass-cli: fix for -fno-common

Patch pulled from upstream GitHub PR  #576.
parent cfc2f645
1 merge request!15851community/lastpass-cli: fix for -fno-common & modernize
......@@ -2,7 +2,7 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=lastpass-cli
pkgver=1.3.3
pkgrel=1
pkgrel=2
pkgdesc="LastPass command line interface tool"
url="https://lastpass.com"
arch="all"
......@@ -13,8 +13,9 @@ subpackages="$pkgname-doc
$pkgname-bash-completion
$pkgname-fish-completion
"
source="$pkgname-$pkgver.tar.gz::https://github.com/lastpass/lastpass-cli/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
source="$pkgname-$pkgver.tar.gz::https://github.com/lastpass/lastpass-cli/archive/v$pkgver.tar.gz
e3311cebdb29a3267843cf656a32f01c5062897e.patch
"
build() {
make all
......@@ -37,4 +38,5 @@ package() {
"$pkgdir"/usr/share/fish/completions/$pkgname.fish
}
sha512sums="9b9274cae1fe4045b7df4402170c522ab5765929739e76141b35a75ce3c8af824acd881e194face45e8721d6ce778bde97ff1a1ac23515de0c6dba28d61a8c7e lastpass-cli-1.3.3.tar.gz"
sha512sums="9b9274cae1fe4045b7df4402170c522ab5765929739e76141b35a75ce3c8af824acd881e194face45e8721d6ce778bde97ff1a1ac23515de0c6dba28d61a8c7e lastpass-cli-1.3.3.tar.gz
0f624e6b83d7d193089b2b13d03f261dc8e9df88cafa9b295ad55a6242ef5cca65c2d8ecb3d7330034a1b3d1bfef4a76d5d07491439f0360ac285cba4f050de5 e3311cebdb29a3267843cf656a32f01c5062897e.patch"
From e3311cebdb29a3267843cf656a32f01c5062897e Mon Sep 17 00:00:00 2001
From: Eric Engestrom <eric@engestrom.ch>
Date: Sun, 25 Oct 2020 09:49:29 +0100
Subject: [PATCH] Fix GCC 10+ build
GCC 10 changed the default option from `-fcommon` to `-fno-common`.
A quick and dirty fix could be to just set `-fcommon` in CMakeLists.txt,
but the proper fix is to move the variables to a single compilation unit
and simply reference them in the other CU, instead of each CU having its
own copy.
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
---
process.c | 3 +++
process.h | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/process.c b/process.c
index 59bdf10..8ccbf34 100644
--- a/process.c
+++ b/process.c
@@ -127,6 +127,9 @@ static int pid_to_cmd(pid_t pid, char *cmd, size_t cmd_size)
#error "Please provide a pid_to_cmd for your platform"
#endif
+int ARGC;
+char **ARGV;
+
void process_set_name(const char *name)
{
size_t argslen = 0;
diff --git a/process.h b/process.h
index 58c2480..4cc2cf4 100644
--- a/process.h
+++ b/process.h
@@ -4,8 +4,8 @@
#include <stdbool.h>
#include <sys/types.h>
-int ARGC;
-char **ARGV;
+extern int ARGC;
+extern char **ARGV;
void process_set_name(const char *name);
void process_disable_ptrace(void);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment