fix fork of processes with active async io contexts
[musl.git] / src / network / h_errno.c
blob638f77180314a625e90507a7890cfafa94e7f1b6
1 #include <netdb.h>
2 #include "pthread_impl.h"
4 #undef h_errno
5 int h_errno;
7 int *__h_errno_location(void)
9 if (!__pthread_self()->stack) return &h_errno;
10 return &__pthread_self()->h_errno_val;