aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2009-08-17 17:14:08 +0200
committerAndi Kleen <ak@linux.intel.com>2009-08-17 17:14:08 +0200
commit31e224da3e368042c56b2ee9cdc225c9590aad56 (patch)
treeaf1281c7b23fdcdf0b6a5e7c560c31884bc6c1fe
parentde1ce52749439b6f8006f614e604331f81617b2a (diff)
downloadmce-test-31e224da3e368042c56b2ee9cdc225c9590aad56.tar.gz
Fix compilation of tcases/ttable with recent kernel
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r--tsrc/tcases.c2
-rw-r--r--tsrc/ttable.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/tsrc/tcases.c b/tsrc/tcases.c
index 51538f0..9c9797e 100644
--- a/tsrc/tcases.c
+++ b/tsrc/tcases.c
@@ -8,6 +8,8 @@
#include <asm/mce.h>
#include <errno.h>
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof(*(x)))
+
typedef unsigned long long u64;
#define MCI_STATUS_S (1ULL<<56) /* Signaled machine check */
diff --git a/tsrc/ttable.c b/tsrc/ttable.c
index 792b07f..c3837bf 100644
--- a/tsrc/ttable.c
+++ b/tsrc/ttable.c
@@ -14,6 +14,8 @@
#include <asm/types.h>
#include <asm/mce.h>
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof(*(x)))
+
typedef unsigned long long u64;