]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Attempt to resolve strict-aliasing violation in refclock_tsyncpci.c.
authorDave Hart <hart@ntp.org>
Mon, 6 Aug 2012 04:22:39 +0000 (04:22 +0000)
committerDave Hart <hart@ntp.org>
Mon, 6 Aug 2012 04:22:39 +0000 (04:22 +0000)
Force prior config.cache files to be flushed due to [Bug 2242] fix
  invalidating getifaddrs() cached result.

bk: 501f468fufvgVB9o9ajC4ENhi_h-cw

ChangeLog
configure.ac
ntpd/refclock_tsyncpci.c
sntp/configure.ac

index 84285f3601793d9c5e31c1f874cff740b7f0901d..f99e79adac6883d8f5015082c0c9799a95535651 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 * [Bug 2242] configure fails to detect getifaddrs function on Solaris.
 * [Bug 2249] Bad operator for 'test' in 'make check' of libevent.
 * [Bug 2252] palisade: formats nanosecs to a 6-char field.
+* Attempt to resolve strict-aliasing violation in refclock_tsyncpci.c.
 (4.2.7p293) 2012/08/04 Released by Harlan Stenn <stenn@ntp.org>
 * [Bug 2247] (more) Get rid of the TRAK refclock - deprecated since 2006.
 * Documentation cleanup from Mike T.
index c7a1aec236e416d834f4f7690f31fa686da5b35f..5bb0e22d5695d3e4ffc45e04afe3a4e95b335ef9 100644 (file)
@@ -34,7 +34,7 @@ AC_PRESERVE_HELP_ORDER
 # the date YYYYMMDD optionally with -HHMM if there is more than one
 # bump in a day.
 
-ntp_configure_cache_version=20110219
+ntp_configure_cache_version=20120806
 
 # When the cache version of config.cache and configure do not
 # match, NTP_CACHEVERSION will flush the cache.
index 61594f06846c05590418d664b294fe9fa94446e2..b203c3f0f36cd3c6fd66b36678e85fb971f12b8d 100644 (file)
@@ -423,6 +423,7 @@ static void tsync_poll(int unit, struct peer *peer)
     ioctl_trans_di      *it2;
     l_fp                 offset;
     l_fp                 ltemp;
+    ReferenceObj *      pRefObj;
 
 
     /* Construct the device name */
@@ -552,9 +553,10 @@ static void tsync_poll(int unit, struct peer *peer)
 
     // Extract reference identifiers from ioctl payload
     memset(timeRef, '\0', sizeof(timeRef));
-    memset(ppsRef,  '\0', sizeof(ppsRef));
-    memcpy(timeRef, ((ReferenceObj*)(it->payloads))->time, TSYNC_REF_LEN);
-    memcpy(ppsRef,  ((ReferenceObj*)(it->payloads))->pps,  TSYNC_REF_LEN);
+    memset(ppsRef, '\0', sizeof(ppsRef));
+    pRefObj = (void *)it->payloads;
+    memcpy(timeRef, pRefObj->time, TSYNC_REF_LEN);
+    memcpy(ppsRef, pRefObj->pps, TSYNC_REF_LEN);
 
     // Extract the Clock Service Time Scale and convert to correct byte order
     memcpy(&tmscl, ((TIME_SCALE*)(it1->payloads)), sizeof(tmscl));
index 4f3e783f69f53e30c99066c2964a3d99ab0f9714..fd56544a7e9117ca728cb5b7283f4304c0eac8ab 100644 (file)
@@ -32,7 +32,7 @@ AC_CONFIG_AUX_DIR([libevent/build-aux])
 # the date YYYYMMDD optionally with -HHMM if there is more than one
 # bump in a day.
 
-sntp_configure_cache_version=20110219
+sntp_configure_cache_version=20120806
 
 # When the version of config.cache and configure do not
 # match, NTP_CACHEVERSION will flush the cache.