fix type error in pthread_create, introduced with pthread_getattr_np
authorRich Felker <dalias@aerifal.cx>
Sat, 6 Apr 2013 05:15:08 +0000 (01:15 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 6 Apr 2013 05:15:08 +0000 (01:15 -0400)
src/thread/pthread_create.c

index 6163f50..e6760ab 100644 (file)
@@ -123,7 +123,7 @@ int pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict attrp
                size_t need = libc.tls_size + __pthread_tsd_size;
                size = attr._a_stacksize + DEFAULT_STACK_SIZE;
                stack = (void *)(attr._a_stackaddr & -16);
                size_t need = libc.tls_size + __pthread_tsd_size;
                size = attr._a_stacksize + DEFAULT_STACK_SIZE;
                stack = (void *)(attr._a_stackaddr & -16);
-               stack_limit = attr._a_stackaddr - size;
+               stack_limit = (void *)(attr._a_stackaddr - size);
                /* Use application-provided stack for TLS only when
                 * it does not take more than ~12% or 2k of the
                 * application's stack space. */
                /* Use application-provided stack for TLS only when
                 * it does not take more than ~12% or 2k of the
                 * application's stack space. */