etc: Enable a tty for a serial port by default.
[dragora.git] / patches / mesa / musl-stacksize.patch
blobcf5b2cd1fb914f10f7dff86c3fdbc5eb726e190f
1 --- a/src/c11/impl/threads_posix.c 2022-10-04 16:30:04.564345425 -0400
2 +++ b/src/c11/impl/threads_posix.c 2022-10-04 16:43:51.794135619 -0400
3 @@ -255,18 +255,33 @@
4 thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
6 struct impl_thrd_param *pack;
7 +#ifdef __GLIBC__
8 + pthread_attr_t *attrp = NULL;
9 +#else
10 + pthread_attr_t attr = { 0 };
11 + pthread_attr_init(&attr);
12 + pthread_attr_setstacksize(&attr, 8388608);
13 + pthread_attr_t *attrp = &attr;
14 +#endif
15 assert(thr != NULL);
16 pack = (struct impl_thrd_param *)malloc(sizeof(struct impl_thrd_param));
17 if (!pack) return thrd_nomem;
18 pack->func = func;
19 pack->arg = arg;
20 - if (pthread_create(thr, NULL, impl_thrd_routine, pack) != 0) {
21 + if (pthread_create(thr, attrp, impl_thrd_routine, pack) != 0) {
22 +#ifndef __GLIBC__
23 + pthread_attr_destroy(&attr);
24 +#endif
25 free(pack);
26 return thrd_error;
28 +#ifndef __GLIBC__
29 + pthread_attr_destroy(&attr);
30 +#endif
31 return thrd_success;
35 // 7.25.5.2
36 thrd_t
37 thrd_current(void)