From 85b2f68b69be9dba5c645ef4bd0e7107f5460e2d Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Fri, 25 Feb 2011 01:49:26 +0000 Subject: [PATCH] Fix build on gcc2. (Note, I honestly have no idea what was initially wrong with the code; everything seamt right to me..) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40676 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/os/thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/system/libroot/os/thread.c b/src/system/libroot/os/thread.c index 68ce51bafd..128aa91ee3 100644 --- a/src/system/libroot/os/thread.c +++ b/src/system/libroot/os/thread.c @@ -83,6 +83,7 @@ spawn_thread(thread_func entry, const char *name, int32 priority, void *data) { struct thread_creation_attributes attributes; pthread_thread* thread; + thread_id id; thread = __allocate_pthread(data); if (thread == NULL) @@ -99,7 +100,7 @@ spawn_thread(thread_func entry, const char *name, int32 priority, void *data) attributes.stack_address = NULL; attributes.stack_size = 0; - thread_id id = _kern_spawn_thread(&attributes); + id = _kern_spawn_thread(&attributes); if (id < 0) free(thread); else