From ced64995c26a28ae40c5ae356b6c6a87a3bdf5ce Mon Sep 17 00:00:00 2001
From: Rich Felker <dalias@aerifal.cx>
Date: Sat, 6 Apr 2013 01:15:08 -0400
Subject: [PATCH] fix type error in pthread_create, introduced with
 pthread_getattr_np

---
 src/thread/pthread_create.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index 6163f509..e6760abb 100644
--- a/src/thread/pthread_create.c
+++ b/src/thread/pthread_create.c
@@ -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);
-		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. */
-- 
2.40.0