From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38239 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgchM-0006iX-S0 for qemu-devel@nongnu.org; Sat, 22 Jan 2011 07:36:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgchL-0007W5-RU for qemu-devel@nongnu.org; Sat, 22 Jan 2011 07:36:08 -0500 Received: from mtagate1.uk.ibm.com ([194.196.100.161]:39404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgchL-0007W0-HC for qemu-devel@nongnu.org; Sat, 22 Jan 2011 07:36:07 -0500 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p0M9TqVM021911 for ; Sat, 22 Jan 2011 09:29:52 GMT Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0M9TsoP1220810 for ; Sat, 22 Jan 2011 09:29:54 GMT Received: from d06av07.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0M9Tp2u028129 for ; Sat, 22 Jan 2011 02:29:51 -0700 From: Stefan Hajnoczi Date: Sat, 22 Jan 2011 09:29:17 +0000 Message-Id: <1295688567-25496-3-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1295688567-25496-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1295688567-25496-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC][PATCH 02/12] continuation: Fix container_of() redefinition List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Anthony Liguori , Stefan Hajnoczi QEMU already has a visible container_of() macro definition. Avoid the compiler error. Signed-off-by: Stefan Hajnoczi --- continuation.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/continuation.h b/continuation.h index 585788e..112df65 100644 --- a/continuation.h +++ b/continuation.h @@ -45,8 +45,10 @@ int cc_release(struct continuation *cc); int cc_swap(struct continuation *from, struct continuation *to); #define offset_of(type, member) ((unsigned long)(&((type *)0)->member)) +#ifndef container_of #define container_of(obj, type, member) \ (type *)(((char *)obj) - offset_of(type, member)) +#endif #endif /* -- 1.7.2.3