Skip to content

Commit 8cf4b8f

Browse files
committed
Emscripten: add pthread_attr_init() workaround
1 parent 4c36b07 commit 8cf4b8f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎Python/ceval.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ _Py_ReachedRecursionLimitWithMargin(PyThreadState *tstate, int margin_count)
7979
#include "emscripten/stack.h"
8080

8181
#define pthread_attr_t workaround_pthread_attr_t
82+
#define pthread_attr_init workaround_pthread_attr_init
8283
#define pthread_getattr_np workaround_pthread_getattr_np
8384
#define pthread_attr_getguardsize workaround_pthread_attr_getguardsize
8485
#define pthread_attr_getstack workaround_pthread_attr_getstack
@@ -91,6 +92,11 @@ typedef struct {
9192

9293
extern __attribute__((__visibility__("hidden"))) unsigned __default_guardsize;
9394

95+
int pthread_attr_init(pthread_attr_t *a)
96+
{
97+
return 0;
98+
}
99+
94100
// Modified version of pthread_getattr_np from the upstream PR.
95101

96102
int pthread_getattr_np(pthread_t thread, pthread_attr_t *attr) {

0 commit comments

Comments
 (0)