From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49902) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YntwG-0007sS-58 for qemu-devel@nongnu.org; Thu, 30 Apr 2015 15:16:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YntwC-00048a-6C for qemu-devel@nongnu.org; Thu, 30 Apr 2015 15:15:59 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YntwB-00048D-Fw for qemu-devel@nongnu.org; Thu, 30 Apr 2015 15:15:55 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D97C120B0C for ; Thu, 30 Apr 2015 15:15:53 -0400 (EDT) From: "Emilio G. Cota" Date: Thu, 30 Apr 2015 15:16:30 -0400 Message-Id: <1430421390-2787-1-git-send-email-cota@braap.org> In-Reply-To: References: Subject: [Qemu-devel] [PATCH] i440fx-test: guard ARRAY_SIZE definition with #ifndef List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Peter Maydell , Peter Crosthwaite , Michael Tokarev , Paolo Bonzini ARRAY_SIZE is defined in osdep.h so having an unconditional definition here is fragile. Signed-off-by: Emilio G. Cota --- tests/i440fx-test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/i440fx-test.c b/tests/i440fx-test.c index d0bc8de..d610e66 100644 --- a/tests/i440fx-test.c +++ b/tests/i440fx-test.c @@ -27,7 +27,9 @@ #define BROKEN 1 +#ifndef ARRAY_SIZE #define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) +#endif typedef struct TestData { -- 1.9.1