]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1669] NTP 4.2.6p2 fails to compile on IBM AIX 5.3.
authorDave Hart <hart@ntp.org>
Fri, 22 Oct 2010 00:33:26 +0000 (00:33 +0000)
committerDave Hart <hart@ntp.org>
Fri, 22 Oct 2010 00:33:26 +0000 (00:33 +0000)
bk: 4cc0dbd6LW2IX0oGqI4gaGXesoIiLQ

ChangeLog
ntpd/ntp_util.c

index 846e86fff1b2979130c434f3561d648a0ec1cec3..a3649aeab58cbab393793764c87848749e0eccec 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+---
+
+* [Bug 1669] NTP 4.2.6p2 fails to compile on IBM AIX 5.3.
+
 ---
 (4.2.6p3-RC4) 2010/10/16 Released by Harlan Stenn <stenn@ntp.org>
 
index 69b55d956dcd15c4d86d6726a535a0ad02d20f6b..8bc95d619a562ec5194df7fd819e9afa85cd2b2d 100644 (file)
@@ -356,6 +356,11 @@ stats_config(
        int     len;
        char    tbuf[80];
        char    str1[20], str2[20];
+#ifndef VMS
+       const char temp_ext[] = ".TEMP";
+#else
+       const char temp_ext[] = "-TEMP";
+#endif
 
        /*
         * Expand environment strings under Windows NT, since the
@@ -410,14 +415,10 @@ stats_config(
                stats_temp_file = erealloc(stats_temp_file, 
                                           len + sizeof(".TEMP"));
 
-               memmove(stats_drift_file, value, (unsigned)(len+1));
-               memmove(stats_temp_file, value, (unsigned)len);
-               memmove(stats_temp_file + len,
-#if !defined(VMS)
-                       ".TEMP", sizeof(".TEMP"));
-#else
-                       "-TEMP", sizeof("-TEMP"));
-#endif /* VMS */
+               memcpy(stats_drift_file, value, (unsigned)(len+1));
+               memcpy(stats_temp_file, value, (unsigned)len);
+               memcpy(stats_temp_file + len, temp_ext,
+                      sizeof(temp_ext));
 
                /*
                 * Open drift file and read frequency. If the file is