public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-crypt/scute/, app-crypt/scute/files/
@ 2021-04-22 11:53 David Seifert
  0 siblings, 0 replies; only message in thread
From: David Seifert @ 2021-04-22 11:53 UTC (permalink / raw
  To: gentoo-commits

commit:     079865b0cd09dc76add2cc8199ff98d3b10a2939
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 22 11:53:12 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Apr 22 11:53:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=079865b0

app-crypt/scute: Add upstream patch for -fno-common

Closes: https://bugs.gentoo.org/782388
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 app-crypt/scute/files/scute-1.7.0-fno-common.patch | 52 ++++++++++++++++++++++
 app-crypt/scute/scute-1.7.0.ebuild                 |  2 +
 2 files changed, 54 insertions(+)

diff --git a/app-crypt/scute/files/scute-1.7.0-fno-common.patch b/app-crypt/scute/files/scute-1.7.0-fno-common.patch
new file mode 100644
index 00000000000..1554d8d0dfe
--- /dev/null
+++ b/app-crypt/scute/files/scute-1.7.0-fno-common.patch
@@ -0,0 +1,52 @@
+From 49ad2b0e05e3fcb8c8c2e23bb1c6063b390dee02 Mon Sep 17 00:00:00 2001
+From: Damien Goutte-Gattat <dgouttegattat@incenp.org>
+Date: Tue, 30 Mar 2021 22:31:40 +0100
+Subject: [PATCH] Do not declare global variable in header file.
+
+* src/options.h (_scute_opt_t): New typedef.
+(_scute_opt): Declare as extern and move definition to ...
+* src/readconf.c (_scute_opt): here.
+--
+
+This fixes build with gcc-10, which has -fno-common enabled by
+default.
+
+GnuPG-bug-id: 5360
+Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
+---
+ src/options.h  | 6 ++++--
+ src/readconf.c | 2 ++
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/src/options.h b/src/options.h
+index 10667db..d74071d 100644
+--- a/src/options.h
++++ b/src/options.h
+@@ -22,10 +22,12 @@
+ #define OPTIONS_H 1
+ 
+ /* Global options.  */
+-struct {
++typedef struct {
+   char *user;
+   int debug_flags;
+-} _scute_opt;
++} _scute_opt_t;
++
++extern _scute_opt_t _scute_opt;
+ 
+ 
+ /*-- readconf.c --*/
+diff --git a/src/readconf.c b/src/readconf.c
+index 387a44f..5af2336 100644
+--- a/src/readconf.c
++++ b/src/readconf.c
+@@ -31,6 +31,8 @@
+ 
+ #include "options.h"
+ 
++_scute_opt_t _scute_opt;
++
+ static const char *
+ my_strusage (int level)
+ {

diff --git a/app-crypt/scute/scute-1.7.0.ebuild b/app-crypt/scute/scute-1.7.0.ebuild
index ef227673fab..6aee8c85a67 100644
--- a/app-crypt/scute/scute-1.7.0.ebuild
+++ b/app-crypt/scute/scute-1.7.0.ebuild
@@ -29,6 +29,8 @@ RDEPEND="
 BDEPEND+="
 	sys-apps/texinfo"
 
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
+
 src_unpack() {
 	default
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-22 11:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-22 11:53 [gentoo-commits] repo/gentoo:master commit in: app-crypt/scute/, app-crypt/scute/files/ David Seifert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox