From jdike@addtoit.com Mon Aug 20 18:05:37 2007 Return-Path: X-Flags: 1001 Delivered-To: GMX delivery to toralf.foerster@gmx.de Received: (qmail invoked by alias); 20 Aug 2007 22:24:26 -0000 Received: from saraswathi.solana.com (EHLO saraswathi.solana.com) [198.99.130.12] by mx0.gmx.net (mx045) with SMTP; 21 Aug 2007 00:24:26 +0200 Received: from localhost.localdomain (littleton.addtoit.com [198.99.130.129]) by saraswathi.solana.com (8.13.1/8.13.1) with ESMTP id l7KMOIKA019447; Mon, 20 Aug 2007 18:24:24 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.13.8/8.13.8) with ESMTP id l7KG5bLU004767; Mon, 20 Aug 2007 12:05:37 -0400 Received: (from jdike@localhost) by localhost.localdomain (8.13.8/8.13.8/Submit) id l7KG5b13004766; Mon, 20 Aug 2007 12:05:37 -0400 Date: Mon, 20 Aug 2007 12:05:37 -0400 From: Jeff Dike To: Toralf =?iso-8859-1?Q?F=F6rster?= Cc: uml-devel Subject: Re: [uml-devel] build error of an UML kernel with 2.6.2x sources Message-ID: <20070820160537.GA3874@localhost.localdomain> References: <200708191142.57281.toralf.foerster@gmx.de> <200708191812.35947.toralf.foerster@gmx.de> <20070820141102.GA5833@c2.user-mode-linux.org> <200708201730.37648.toralf.foerster@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200708201730.37648.toralf.foerster@gmx.de> User-Agent: Mutt/1.4.2.3i X-GMX-Antivirus: -1 (not scanned, may not use virus scanner) X-GMX-Antispam: 0 (Mail was not recognized as spam) X-GMX-UID: 1GGrIvcYa0ApcLibODEzng03Njh6dM6j Status: RO X-Status: RC X-KMail-EncryptionState: N X-KMail-SignatureState: N X-KMail-MDN-Sent: 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 #include #include +#include #include #include -#include #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 #include #include +#include #define __FRAME_OFFSETS #include #include -/* For some reason, x86_64 defines u64 and u32 only in , 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 #define DEFINE(sym, val) \ asm volatile("\n->" #sym " %0 " #val : : "i" (val))