implement getuid and getpid

This commit is contained in:
Meco Man
2021-02-21 17:25:36 +08:00
parent c21f018b4a
commit d06420e1d7
3 changed files with 18 additions and 0 deletions

View File

@@ -73,4 +73,7 @@ char * ttyname (int desc);
unsigned int sleep(unsigned int seconds);
int usleep(useconds_t usec);
uid_t getuid(void);
pid_t getpid(void);
#endif /* _SYS_UNISTD_H */

View File

@@ -49,3 +49,15 @@ int usleep(useconds_t usec)
return 0;
}
RTM_EXPORT(usleep);
uid_t getuid(void)
{
return -1;
}
RTM_EXPORT(getuid);
pid_t getpid(void)
{
return -1;
}
RTM_EXPORT(getuid);

View File

@@ -47,4 +47,7 @@ char * ttyname (int desc);
unsigned int sleep(unsigned int seconds);
int usleep(useconds_t usec);
uid_t getuid(void);
pid_t getpid(void);
#endif /* _SYS_UNISTD_H */