[PATCH] Mark global variables in chat.h as extern

[PATCH] Mark global variables in chat.h as extern

From: Michael Forney
This fixes the build with gcc 10, which enables -fno-common by
default.
---
 chat.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/chat.h b/chat.h
index e0266ef..5307f8b 100644
--- a/chat.h
+++ b/chat.h
@@ -162,9 +162,9 @@ void ircFormat(const char *format, ...)
 	__attribute__((format(printf, 1, 2)));
 void ircClose(void);
 
-uint execID;
-int execPipe[2];
-int utilPipe[2];
+extern uint execID;
+extern int execPipe[2];
+extern int utilPipe[2];
 
 enum { UtilCap = 16 };
 struct Util {
-- 
2.26.2

Re: [PATCH] Mark global variables in chat.h as extern

From: June Bug
Thanks, applied.

I really just forgot to write extern on those ones, huh. Is there
a warning I can turn on for that?

Re: [PATCH] Mark global variables in chat.h as extern

From: Michael Forney
On 2020-05-07, June Bug <june@causal.agency> wrote:
> Thanks, applied.

Thanks!

> I really just forgot to write extern on those ones, huh. Is there
> a warning I can turn on for that?

You can put -fno-common in CFLAGS, or enable a link time warning with
-Wl,--warn-common in LDFLAGS. It can only be detected during linking,
so there is no -W flag for that.