1 2 3 4 5 6 7
#include <__thread.h> #include <threads.h> int *__errno(void) { return &thrd_current()->terrno; }