From f19279abda25aeeea0a1c78fa106b8479f4592cb Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 10 Feb 2005 02:59:37 +0000 Subject: [PATCH] Danger! The size of empty structures differs between C and C++, so we have to put something in, if we want to use them from both. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11314 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/arch/x86/thread_struct.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/headers/private/kernel/arch/x86/thread_struct.h b/headers/private/kernel/arch/x86/thread_struct.h index cfe1809167..4e017914a2 100755 --- a/headers/private/kernel/arch/x86/thread_struct.h +++ b/headers/private/kernel/arch/x86/thread_struct.h @@ -33,7 +33,10 @@ struct arch_thread { }; struct arch_team { - // nothing here + // gcc treats empty structures as zero-length in C, but as if they contain + // a char in C++. So we have to put a dummy in to be able to use the struct + // from both in a consistent way. + char dummy; }; struct arch_fork_arg {