--- old/usr/src/lib/smbsrv/libmlsvc/common/mlsvc.h	Sun Mar 18 01:12:53 2018
+++ new/usr/src/lib/smbsrv/libmlsvc/common/mlsvc.h	Sun Mar 18 01:12:53 2018
@@ -46,7 +46,6 @@
 void samr_initialize(void);
 void svcctl_initialize(void);
 void winreg_initialize(void);
-int srvsvc_gettime(unsigned long *);
 void msgsvcsend_initialize(void);
 void spoolss_initialize(void);
 void netdfs_initialize(void);
@@ -64,7 +63,8 @@
     struct netr_authenticator *);
 DWORD netr_validate_chain(struct netr_info *, struct netr_authenticator *);
 
-void ndr_srvsvc_timecheck(char *, char *);
+int srvsvc_gettime(unsigned long *);
+void srvsvc_timecheck(char *, char *);
 
 /* Generic functions to get/set windows Security Descriptors */
 uint32_t srvsvc_sd_get(smb_share_t *, uint8_t *, uint32_t *);
--- old/usr/src/lib/smbsrv/libmlsvc/common/mlsvc_client.c	Sun Mar 18 01:12:53 2018
+++ new/usr/src/lib/smbsrv/libmlsvc/common/mlsvc_client.c	Sun Mar 18 01:12:53 2018
@@ -31,13 +31,11 @@
 #include <sys/types.h>
 #include <sys/errno.h>
 #include <sys/fcntl.h>
-#include <sys/tzfile.h>
 #include <time.h>
 #include <strings.h>
 #include <assert.h>
 #include <errno.h>
 #include <thread.h>
-#include <unistd.h>
 #include <syslog.h>
 #include <synch.h>
 
@@ -603,46 +601,3 @@
 		clnt->heap_preserved = B_FALSE;
 	}
 }
-
-
-/*
- * Compare the time here with the remote time on the server
- * and report clock skew.
- */
-void
-ndr_srvsvc_timecheck(char *server, char *domain)
-{
-	char			hostname[MAXHOSTNAMELEN];
-	struct timeval		dc_tv;
-	struct tm		dc_tm;
-	struct tm		*tm;
-	time_t			tnow;
-	time_t			tdiff;
-	int			priority;
-
-	if (srvsvc_net_remote_tod(server, domain, &dc_tv, &dc_tm) < 0) {
-		syslog(LOG_DEBUG, "srvsvc_net_remote_tod failed");
-		return;
-	}
-
-	tnow = time(NULL);
-
-	if (tnow > dc_tv.tv_sec)
-		tdiff = (tnow - dc_tv.tv_sec) / SECSPERMIN;
-	else
-		tdiff = (dc_tv.tv_sec - tnow) / SECSPERMIN;
-
-	if (tdiff != 0) {
-		(void) strlcpy(hostname, "localhost", MAXHOSTNAMELEN);
-		(void) gethostname(hostname, MAXHOSTNAMELEN);
-
-		priority = (tdiff > 2) ? LOG_NOTICE : LOG_DEBUG;
-		syslog(priority, "DC [%s] clock skew detected: %u minutes",
-		    server, tdiff);
-
-		tm = gmtime(&dc_tv.tv_sec);
-		syslog(priority, "%-8s  UTC: %s", server, asctime(tm));
-		tm = gmtime(&tnow);
-		syslog(priority, "%-8s  UTC: %s", hostname, asctime(tm));
-	}
-}
--- old/usr/src/lib/smbsrv/libmlsvc/common/mlsvc_init.c	Sun Mar 18 01:12:53 2018
+++ new/usr/src/lib/smbsrv/libmlsvc/common/mlsvc_init.c	Sun Mar 18 01:12:53 2018
@@ -111,7 +111,7 @@
 		if (!smb_domain_getinfo(&di))
 			continue;
 
-		ndr_srvsvc_timecheck(di.d_dci.dc_name,
+		srvsvc_timecheck(di.d_dci.dc_name,
 		    di.d_primary.di_nbname);
 	}
 
--- old/usr/src/lib/smbsrv/libmlsvc/common/srvsvc_clnt.c	Sun Mar 18 01:12:53 2018
+++ new/usr/src/lib/smbsrv/libmlsvc/common/srvsvc_clnt.c	Sun Mar 18 01:12:53 2018
@@ -34,9 +34,11 @@
  */
 
 #include <sys/errno.h>
+#include <sys/tzfile.h>
 #include <stdio.h>
 #include <time.h>
 #include <strings.h>
+#include <unistd.h>
 
 #include <smbsrv/libsmb.h>
 #include <smbsrv/libmlsvc.h>
@@ -409,6 +411,48 @@
 	return (0);
 }
 
+/*
+ * Compare the time here with the remote time on the server
+ * and report clock skew.
+ */
+void
+srvsvc_timecheck(char *server, char *domain)
+{
+	char			hostname[MAXHOSTNAMELEN];
+	struct timeval		dc_tv;
+	struct tm		dc_tm;
+	struct tm		*tm;
+	time_t			tnow;
+	time_t			tdiff;
+	int			priority;
+
+	if (srvsvc_net_remote_tod(server, domain, &dc_tv, &dc_tm) < 0) {
+		syslog(LOG_DEBUG, "srvsvc_net_remote_tod failed");
+		return;
+	}
+
+	tnow = time(NULL);
+
+	if (tnow > dc_tv.tv_sec)
+		tdiff = (tnow - dc_tv.tv_sec) / SECSPERMIN;
+	else
+		tdiff = (dc_tv.tv_sec - tnow) / SECSPERMIN;
+
+	if (tdiff != 0) {
+		(void) strlcpy(hostname, "localhost", MAXHOSTNAMELEN);
+		(void) gethostname(hostname, MAXHOSTNAMELEN);
+
+		priority = (tdiff > 2) ? LOG_NOTICE : LOG_DEBUG;
+		syslog(priority, "DC [%s] clock skew detected: %u minutes",
+		    server, tdiff);
+
+		tm = gmtime(&dc_tv.tv_sec);
+		syslog(priority, "%-8s  UTC: %s", server, asctime(tm));
+		tm = gmtime(&tnow);
+		syslog(priority, "%-8s  UTC: %s", hostname, asctime(tm));
+	}
+}
+
 /*
  * Synchronize the local system clock with the domain controller.
  */
