22 lines
527 B
C
22 lines
527 B
C
#include <sys/stat.h>
|
|
#include <errno.h>
|
|
#include <_ansi.h>
|
|
#include <reent.h>
|
|
|
|
/* Minimal implementation of _fstat_r */
|
|
int _fstat_r(struct _reent *r, int file, struct stat *st) {
|
|
st->st_mode = S_IFCHR; /* Character device */
|
|
return 0;
|
|
}
|
|
|
|
/* Minimal implementation of _getpid_r */
|
|
int _getpid_r(struct _reent *r) {
|
|
return 1; /* Return a dummy process ID */
|
|
}
|
|
|
|
/* Minimal implementation of _kill_r */
|
|
int _kill_r(struct _reent *r, int pid, int sig) {
|
|
r->_errno = EINVAL;
|
|
return -1; /* Indicate failure */
|
|
}
|