Commit 289a2529 authored by Bang Jun-Young's avatar Bang Jun-Young Committed by Alexandre Julliard

Use clone() if HAVE_CLONE is defined.

parent e4a98ec1
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
DEFAULT_DEBUG_CHANNEL(thread); DEFAULT_DEBUG_CHANNEL(thread);
#ifdef linux #if defined(linux) || defined(HAVE_CLONE)
# ifdef HAVE_SCHED_H # ifdef HAVE_SCHED_H
# include <sched.h> # include <sched.h>
# endif # endif
...@@ -40,7 +40,7 @@ DEFAULT_DEBUG_CHANNEL(thread); ...@@ -40,7 +40,7 @@ DEFAULT_DEBUG_CHANNEL(thread);
# define CLONE_SIGHAND 0x00000800 # define CLONE_SIGHAND 0x00000800
# define CLONE_PID 0x00001000 # define CLONE_PID 0x00001000
# endif /* CLONE_VM */ # endif /* CLONE_VM */
#endif /* linux */ #endif /* linux || HAVE_CLONE */
/*********************************************************************** /***********************************************************************
* SYSDEPS_SetCurThread * SYSDEPS_SetCurThread
...@@ -91,7 +91,7 @@ int SYSDEPS_SpawnThread( TEB *teb ) ...@@ -91,7 +91,7 @@ int SYSDEPS_SpawnThread( TEB *teb )
{ {
#ifdef ERRNO_LOCATION #ifdef ERRNO_LOCATION
#ifdef linux #if defined(linux) || defined(HAVE_CLONE)
const int flags = CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD; const int flags = CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD;
if (clone( (int (*)(void *))SYSDEPS_StartThread, teb->stack_top, flags, teb ) < 0) if (clone( (int (*)(void *))SYSDEPS_StartThread, teb->stack_top, flags, teb ) < 0)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment