uml: fix a compile error
authorWANG Cong <wangcong@zeuux.org>
Sun, 19 Oct 2008 03:27:26 +0000 (20:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 20 Oct 2008 15:52:34 +0000 (08:52 -0700)
Fix

arch/um/sys-i386/signal.c: In function 'copy_sc_from_user':
arch/um/sys-i386/signal.c:182: warning: dereferencing 'void *' pointer
arch/um/sys-i386/signal.c:182: error: request for member '_fxsr_env' in something not a structure or union

Signed-off-by: WANG Cong <wangcong@zeuux.org>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/sys-i386/signal.c

index fd0c25a..1296473 100644 (file)
@@ -179,7 +179,8 @@ static int copy_sc_from_user(struct pt_regs *regs,
        if (have_fpx_regs) {
                struct user_fxsr_struct fpx;
 
-               err = copy_from_user(&fpx, &sc.fpstate->_fxsr_env[0],
+               err = copy_from_user(&fpx,
+                       &((struct _fpstate __user *)sc.fpstate)->_fxsr_env[0],
                                     sizeof(struct user_fxsr_struct));
                if (err)
                        return 1;