From ec2e7c2bdfb1e6f9dbba63f9767e02fa2c4c9a2b Mon Sep 17 00:00:00 2001 From: Philippe Waroquiers Date: Sun, 27 May 2012 20:21:02 +0000 Subject: [PATCH] fix the warning introduced by fixing SETTLS clone flag PRE_READ logic on amd64, vki_modify_ldt_t was defined as void (not very clear why). sizeof (void) cannot be taken (or more precisely can be taken, but nobody knows what that means and what gcc does). So, uncommended the (supposedly) correct definition of the type. Note that I checked the definition on debian 6.0, kernel 2.6.32 and the structure is still ok. Still needed to look at the other platforms not properly handling the *SETTID and the SETTLS flags in clone PRE_READ logic and/or not defining the type vki_modify_ldt_t git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12589 --- include/vki/vki-amd64-linux.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/vki/vki-amd64-linux.h b/include/vki/vki-amd64-linux.h index 18e458863d..db7b4e00fe 100644 --- a/include/vki/vki-amd64-linux.h +++ b/include/vki/vki-amd64-linux.h @@ -558,11 +558,13 @@ struct vki_ucontext { // type for x86 (the final 'lm' field is added); I'm not sure about the // significance of that... --njn -#if 0 /* [[Nb: This is the structure passed to the modify_ldt syscall. Just so as to confuse and annoy everyone, this is _not_ the same as an VgLdtEntry and has to be translated into such. The logic for doing so, in vg_ldt.c, is copied from the kernel sources.]] */ +/* Note also that a comment in ldt.h indicates that the below + contains several fields ignored on 64bit, and that modify_ldt + is rather for 32bit. */ struct vki_user_desc { unsigned int entry_number; unsigned long base_addr; @@ -578,9 +580,6 @@ struct vki_user_desc { // [[Nb: for our convenience within Valgrind, use a more specific name]] typedef struct vki_user_desc vki_modify_ldt_t; -#endif - -typedef void vki_modify_ldt_t; //---------------------------------------------------------------------- // From linux-2.6.11.2/include/asm-x86_64/ipcbuf.h -- 2.47.2