From: Juergen Perlinger Date: Thu, 15 Oct 2020 18:29:32 +0000 (+0200) Subject: [Bug 3688] GCC 10 build errors in testsuite X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e721f8f595cae138bc811c4de50f48f87d26d91;p=thirdparty%2Fntp.git [Bug 3688] GCC 10 build errors in testsuite - fix the real issue -- 'progname' defined in wrong file bk: 5f88950canMkp2sAppb4N3StOQWR2A --- diff --git a/sntp/log.c b/sntp/log.c index 29b2ab4f5..6f45c635b 100644 --- a/sntp/log.c +++ b/sntp/log.c @@ -2,9 +2,7 @@ #include "log.h" -#ifndef LOG_PROGNAME_IS_EXTERN -const char *progname; /* for msyslog use too */ -#endif +extern const char *progname; /* for msyslog use too */ static int counter = 0; diff --git a/sntp/main.c b/sntp/main.c index 8a4a2e562..69de299a7 100644 --- a/sntp/main.c +++ b/sntp/main.c @@ -20,6 +20,7 @@ #include "log.h" #include "libntp.h" +const char * progname; int shutting_down; int time_derived; diff --git a/sntp/tests/t-log.c b/sntp/tests/t-log.c index 68b0e12ed..7b935c302 100644 --- a/sntp/tests/t-log.c +++ b/sntp/tests/t-log.c @@ -3,7 +3,6 @@ #include "ntp_types.h" -#define LOG_PROGNAME_IS_EXTERN 1 #include "log.c" void setUp(void);