From: Dave Hart Date: Fri, 22 Oct 2010 00:33:26 +0000 (+0000) Subject: [Bug 1669] NTP 4.2.6p2 fails to compile on IBM AIX 5.3. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd31dbb773f947748385515096902fd16e59ae4d;p=thirdparty%2Fntp.git [Bug 1669] NTP 4.2.6p2 fails to compile on IBM AIX 5.3. bk: 4cc0dbd6LW2IX0oGqI4gaGXesoIiLQ --- diff --git a/ChangeLog b/ChangeLog index 846e86fff1..a3649aeab5 100644 --- 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 diff --git a/ntpd/ntp_util.c b/ntpd/ntp_util.c index 69b55d956d..8bc95d619a 100644 --- a/ntpd/ntp_util.c +++ b/ntpd/ntp_util.c @@ -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