From 160d7bed45316496a9b2b1de103bf326bbb4ff3c Mon Sep 17 00:00:00 2001 From: Benjamin Porter Date: Sun, 26 Apr 2020 10:52:50 -0600 Subject: [PATCH] Fix compile error on GCC 10 (Fedora 32) GCC 10 complains about the unused variable called "unused" Adding `extern` to the declarations fixes the error. Fixes #301 --- compat-pledge.c | 2 +- compat-reallocarray.c | 2 +- compat-strtonum.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compat-pledge.c b/compat-pledge.c index 26676997..25dacf9f 100644 --- a/compat-pledge.c +++ b/compat-pledge.c @@ -1,6 +1,6 @@ #include "config.h" -int unused; +extern int unused; #ifndef HAVE_PLEDGE diff --git a/compat-reallocarray.c b/compat-reallocarray.c index 109832df..9a7406b7 100644 --- a/compat-reallocarray.c +++ b/compat-reallocarray.c @@ -1,6 +1,6 @@ #include "config.h" -int unused; +extern int unused; #ifndef HAVE_REALLOCARRAY diff --git a/compat-strtonum.c b/compat-strtonum.c index 411de46a..e1c3b5e7 100644 --- a/compat-strtonum.c +++ b/compat-strtonum.c @@ -1,6 +1,6 @@ #include "config.h" -int unused; +extern int unused; #ifndef HAVE_STRTONUM