clone_cruft.h 469 B

12345678910111213141516171819202122
  1. /* because people like to make things difficult */
  2. #undef do_clone
  3. #define crappy_sizeof(s) (s == NULL ? 0 : sizeof(s))
  4. #if defined __ia64__
  5. # define do_clone(fn, stack, flags, arg) \
  6. __clone2(fn, stack, crappy_sizeof(stack), flags, arg, NULL, NULL, NULL)
  7. #elif defined __hppa__
  8. # define do_clone(fn, stack, flags, arg) \
  9. clone(fn, stack, flags, arg)
  10. #else
  11. # define do_clone(fn, stack, flags, arg) \
  12. clone(fn, stack+crappy_sizeof(stack), flags, arg)
  13. #endif