Files
learnFPGAProject/FIRMWARE/errno.c
T
2026-10-04 20:11:36 +03:00

12 lines
348 B
C
Executable File

// Sometimes __errno is not linked, here is a dummy replacement.
// Note that __errno is a function that returns a pointer to the
// actual __errno (this is for multithreading). Made me bang my
// head to the wall (and made tinyraytracer crash because powf()
// was *calling* __errno).
int* __errno() {
static int val = 0;
return &val;
}