Summary: | build of a user mode linux kernel failed for 2.6.2x | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Toralf Förster
2007-08-20 17:07:36 UTC
*** This bug has been marked as a duplicate of bug 170544 *** After I applied the patch (see below) I run into another compile error. I'd like to reopen this bug b/c (1) there is an issue with current kernels too (2) there is another issue beside the inlcude of user.h (3) I cannot reopen the original bug #170544 Here's what I got from Jeff Dike: On Mon, Aug 20, 2007 at 05:30:37PM +0200, Toralf Förster wrote: > I found this in /usr/include/sys/user.h (the file was installed from > glibc-2.5-r4): sys/user works for me - try the patch below. Jeff -- Work email - jdike at linux dot intel dot com Index: linux-2.6.22/arch/um/sys-i386/user-offsets.c =================================================================== --- linux-2.6.22.orig/arch/um/sys-i386/user-offsets.c +++ linux-2.6.22/arch/um/sys-i386/user-offsets.c @@ -2,9 +2,9 @@ #include <stddef.h> #include <signal.h> #include <sys/poll.h> +#include <sys/user.h> #include <sys/mman.h> #include <asm/ptrace.h> -#include <asm/user.h> #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) @@ -48,8 +48,8 @@ void foo(void) OFFSET(HOST_SC_FP_ST, _fpstate, _st); OFFSET(HOST_SC_FXSR_ENV, _fpstate, _fxsr_env); - DEFINE_LONGS(HOST_FP_SIZE, sizeof(struct user_i387_struct)); - DEFINE_LONGS(HOST_XFP_SIZE, sizeof(struct user_fxsr_struct)); + DEFINE_LONGS(HOST_FP_SIZE, sizeof(struct user_fpregs_struct)); + DEFINE_LONGS(HOST_XFP_SIZE, sizeof(struct user_fpxregs_struct)); DEFINE(HOST_IP, EIP); DEFINE(HOST_SP, UESP); Index: linux-2.6.22/arch/um/sys-x86_64/user-offsets.c =================================================================== --- linux-2.6.22.orig/arch/um/sys-x86_64/user-offsets.c +++ linux-2.6.22/arch/um/sys-x86_64/user-offsets.c @@ -3,17 +3,10 @@ #include <signal.h> #include <sys/poll.h> #include <sys/mman.h> +#include <sys/user.h> #define __FRAME_OFFSETS #include <asm/ptrace.h> #include <asm/types.h> -/* For some reason, x86_64 defines u64 and u32 only in <pci/types.h>, which I - * refuse to include here, even though they're used throughout the headers. - * These are used in asm/user.h, and that include can't be avoided because of - * the sizeof(struct user_regs_struct) below. - */ -typedef __u64 u64; -typedef __u32 u32; -#include <asm/user.h> #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val)) Yes, as said on the other bug, this is known upstream but not fixed in vanilla kernel yet; so you'll have to wait until it gets in, or use the patched usermode-sources meanwhile. *** This bug has been marked as a duplicate of bug 182089 *** |