This commit is contained in:
Meco Man 2021-02-21 18:01:29 +08:00
parent d06420e1d7
commit c13c00e45c
3 changed files with 38 additions and 6 deletions

View File

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

View File

@ -50,14 +50,38 @@ int usleep(useconds_t usec)
} }
RTM_EXPORT(usleep); RTM_EXPORT(usleep);
pid_t getpid(void)
{
return 0;
}
RTM_EXPORT(getpid);
pid_t getppid(void)
{
return 0;
}
RTM_EXPORT(getppid);
uid_t getuid(void) uid_t getuid(void)
{ {
return -1; return 0;
} }
RTM_EXPORT(getuid); RTM_EXPORT(getuid);
pid_t getpid(void) uid_t geteuid(void)
{ {
return -1; return 0;
} }
RTM_EXPORT(getuid); RTM_EXPORT(geteuid);
gid_t getgid(void)
{
return 0;
}
RTM_EXPORT(getgid);
gid_t getegid(void)
{
return 0;
}
RTM_EXPORT(getegid);

View File

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