aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/common/pack.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/common/pack.h b/test/common/pack.h
index a46a2a98b8..68254db187 100644
--- a/test/common/pack.h
+++ b/test/common/pack.h
@@ -2,6 +2,7 @@
#include "common/stdafx.h"
#include "common/scummsys.h"
+#include <stddef.h>
#include <common/pack-start.h> // START STRUCT PACKING
@@ -15,7 +16,7 @@ struct TestStruct {
#include <common/pack-end.h> // END STRUCT PACKING
-#define OFFS(type,item) (int)(&((type*)0)->type::item)
+#define OFFS(type,item) (((ptrdiff_t)(&((type*)42)->type::item))-42)
class PackTestSuite : public CxxTest::TestSuite
{