summaryrefslogtreecommitdiff
path: root/stddef.c
diff options
context:
space:
mode:
Diffstat (limited to 'stddef.c')
-rw-r--r--stddef.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stddef.c b/stddef.c
index 73f0dfd..c42abf3 100644
--- a/stddef.c
+++ b/stddef.c
@@ -12,11 +12,13 @@ void test_stddef_h(void)
char b;
};
+ static struct s the_s;
+
testing_header("stddef.h");
test_true(NULL == 0);
- test_int_equals(offsetof(struct s, b), 1);
+ test_int_equals(offsetof(struct s, b), (char*)&(the_s.b) - (char*)&the_s);
testing_end();
}