]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/vdso/vclock_gettime.c
x86: use explicit copy in vdso_gettimeofday()
[linux-2.6-omap-h63xx.git] / arch / x86 / vdso / vclock_gettime.c
index 23476c2ebfc4b38b817e5907e0c658e7d21a6715..efa2ba7c600567ea95c29202eee2d87b892cb60d 100644 (file)
@@ -106,9 +106,9 @@ int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
                do_realtime((struct timespec *)tv);
                tv->tv_usec /= 1000;
                if (unlikely(tz != NULL)) {
-                       /* This relies on gcc inlining the memcpy. We'll notice
-                          if it ever fails to do so. */
-                       memcpy(tz, &gtod->sys_tz, sizeof(struct timezone));
+                       /* Avoid memcpy. Some old compilers fail to inline it */
+                       tz->tz_minuteswest = gtod->sys_tz.tz_minuteswest;
+                       tz->tz_dsttime = gtod->sys_tz.tz_dsttime;
                }
                return 0;
        }