amiro-os / stubs.c @ c0757912
History | View | Annotate | Download (399 Bytes)
| 1 | 58fe0e0b | Thomas Schöpping | #include <errno.h> |
|---|---|---|---|
| 2 | #undef errno
|
||
| 3 | extern int errno; |
||
| 4 | |||
| 5 | /* libc stub */
|
||
| 6 | __attribute__((used)) void *__dso_handle = 0; |
||
| 7 | |||
| 8 | /* libc stub */
|
||
| 9 | __attribute__((used)) int _getpid(void) { |
||
| 10 | return 1; |
||
| 11 | } |
||
| 12 | |||
| 13 | /* libc stub */
|
||
| 14 | __attribute__((used)) void _exit(int i) { |
||
| 15 | (void)i;
|
||
| 16 | while(1); |
||
| 17 | } |
||
| 18 | |||
| 19 | /* libc stub */
|
||
| 20 | |||
| 21 | __attribute__((used)) int _kill(int pid, int sig) { |
||
| 22 | (void)pid;
|
||
| 23 | (void)sig;
|
||
| 24 | errno = EINVAL; |
||
| 25 | return -1; |
||
| 26 | } |