static inline long get_tv32(struct timeval *o, struct compat_timeval *i)
 {
-       return (!access_ok(VERIFY_READ, tv32, sizeof(*tv32)) ||
+       return (!access_ok(VERIFY_READ, o, sizeof(*o)) ||
                (__get_user(o->tv_sec, &i->tv_sec) ||
                 __get_user(o->tv_usec, &i->tv_usec)));
 }
 
 #define segment_eq(a,b) ((a).ar4 == (b).ar4)
 
 
-#define __access_ok(addr,size) (1)
-
+static inline int __access_ok(const void *addr, unsigned long size)
+{
+       return 1;
+}
 #define access_ok(type,addr,size) __access_ok(addr,size)
 
 /*
        case 1: {                                               \
                unsigned char __x;                              \
                __get_user_asm(__x, ptr, __gu_err);             \
-               (x) = (__typeof__(*(ptr))) __x;                 \
+               (x) = *(__typeof__(*(ptr)) *) &__x;             \
                break;                                          \
        };                                                      \
        case 2: {                                               \
                unsigned short __x;                             \
                __get_user_asm(__x, ptr, __gu_err);             \
-               (x) = (__typeof__(*(ptr))) __x;                 \
+               (x) = *(__typeof__(*(ptr)) *) &__x;             \
                break;                                          \
        };                                                      \
        case 4: {                                               \
                unsigned int __x;                               \
                __get_user_asm(__x, ptr, __gu_err);             \
-               (x) = (__typeof__(*(ptr))) __x;                 \
+               (x) = *(__typeof__(*(ptr)) *) &__x;             \
                break;                                          \
        };                                                      \
        case 8: {                                               \
                unsigned long long __x;                         \
                __get_user_asm(__x, ptr, __gu_err);             \
-               (x) = (__typeof__(*(ptr))) __x;                 \
+               (x) = *(__typeof__(*(ptr)) *) &__x;             \
                break;                                          \
        };                                                      \
        default:                                                \