summaryrefslogtreecommitdiff
path: root/test/unistd/clone_cruft.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/unistd/clone_cruft.h')
-rw-r--r--test/unistd/clone_cruft.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/unistd/clone_cruft.h b/test/unistd/clone_cruft.h
index dacc1b2bf..2c04ca6f3 100644
--- a/test/unistd/clone_cruft.h
+++ b/test/unistd/clone_cruft.h
@@ -2,10 +2,12 @@
#undef do_clone
+#define crappy_sizeof(s) (s == NULL ? 0 : sizeof(s))
+
#if defined __ia64__
# define do_clone(fn, stack, flags, arg) \
- __clone2(fn, stack, sizeof(stack), flags, arg, NULL, NULL, NULL)
+ __clone2(fn, stack, crappy_sizeof(stack), flags, arg, NULL, NULL, NULL)
#elif defined __hppa__
@@ -15,6 +17,6 @@
#else
# define do_clone(fn, stack, flags, arg) \
- clone(fn, stack+sizeof(stack), flags, arg)
+ clone(fn, stack+crappy_sizeof(stack), flags, arg)
#endif