svn commit: r359676 - in head/contrib/ntp: include ntpd

Kyle Evans kevans at FreeBSD.org
Mon Apr 6 23:11:44 UTC 2020


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


More information about the svn-src-all mailing list