summaryrefslogtreecommitdiff
path: root/ntpshmread.c
diff options
context:
space:
mode:
Diffstat (limited to 'ntpshmread.c')
-rw-r--r--ntpshmread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ntpshmread.c b/ntpshmread.c
index 498b78ee..c75410be 100644
--- a/ntpshmread.c
+++ b/ntpshmread.c
@@ -85,7 +85,7 @@ enum segstat_t ntp_read(struct shmTime *shm_in, struct shm_stat_t *shm_stat, con
* page size).
*/
memory_barrier();
- shmcopy = *shm;
+ memcpy((void *)&shmcopy, (void *)shm, sizeof(struct shmTime));
/*
* An update consumer such as ntpd should zero the valid flag at this point.