Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Apr 2020 23:11:43 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r359676 - in head/contrib/ntp: include ntpd
Message-ID:  <202004062311.036NBhiI007065@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Apr  6 23:11:43 2020
New Revision: 359676
URL: https://svnweb.freebsd.org/changeset/base/359676

Log:
  ntpd: fix build with -fno-common
  
  Only a small nit here: psl should be declared extern and defined exactly
  once.
  
  -fno-common will become the default in GCC10/LLVM11.
  
  MFC after:	3 days

Modified:
  head/contrib/ntp/include/ntp_config.h
  head/contrib/ntp/ntpd/ntp_config.c

Modified: head/contrib/ntp/include/ntp_config.h
==============================================================================
--- head/contrib/ntp/include/ntp_config.h	Mon Apr  6 23:08:07 2020	(r359675)
+++ head/contrib/ntp/include/ntp_config.h	Mon Apr  6 23:11:43 2020	(r359676)
@@ -280,7 +280,7 @@ typedef struct settrap_parms_tag {
  * Poll Skew List
  */
 
-psl_item psl[17-3+1];		/* values for polls 3-17 */
+extern psl_item psl[17-3+1];	/* values for polls 3-17 */
 				/* To simplify the runtime code we */
 				/* don't want to have to special-case */
 				/* dealing with a default */

Modified: head/contrib/ntp/ntpd/ntp_config.c
==============================================================================
--- head/contrib/ntp/ntpd/ntp_config.c	Mon Apr  6 23:08:07 2020	(r359675)
+++ head/contrib/ntp/ntpd/ntp_config.c	Mon Apr  6 23:11:43 2020	(r359676)
@@ -202,6 +202,8 @@ int	cryptosw;		/* crypto command called */
 
 extern char *stats_drift_file;	/* name of the driftfile */
 
+psl_item psl[17-3+1];
+
 #ifdef BC_LIST_FRAMEWORK_NOT_YET_USED
 /*
  * backwards compatibility flags



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004062311.036NBhiI007065>