From 9c35035a40dcfe8786b5f394fedf15418c682468 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 18 Apr 2020 22:42:09 +0200 Subject: [PATCH] Fix build with gcc-10 -fno-common is now the default, so keep only one definition of the variable. --- log.c | 2 ++ log.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/log.c b/log.c index 1ecf6c8..f60b374 100644 --- a/log.c +++ b/log.c @@ -33,6 +33,8 @@ #include "options.h" #include "log.h" +FILE *logfile; + extern struct spd_options options; void LOG(int level, char *format, ...) diff --git a/log.h b/log.h index 23fc2f6..bce8dba 100644 --- a/log.h +++ b/log.h @@ -22,7 +22,7 @@ #ifndef LOG_H #define LOG_H -FILE *logfile; +extern FILE *logfile; void LOG(int level, char *format, ...); #define FATAL(status, format...) { LOG(0, format); exit(status); }