diff options
| author | Meco Man <[email protected]> | 2021-02-21 18:01:29 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-02-21 18:01:29 +0800 |
| commit | c13c00e45cb7af93c3e2b697555778844d1ebaec (patch) | |
| tree | 1609e052f38b25723b91c90dba6bb64f21bebe49 /components | |
| parent | d06420e1d7eda43fb7e76a726be7ee4a06018ed0 (diff) | |
update
Diffstat (limited to 'components')
| -rw-r--r-- | components/libc/compilers/armlibc/sys/unistd.h | 6 | ||||
| -rw-r--r-- | components/libc/compilers/common/unistd.c | 32 | ||||
| -rw-r--r-- | components/libc/compilers/dlib/sys/unistd.h | 6 |
3 files changed, 38 insertions, 6 deletions
diff --git a/components/libc/compilers/armlibc/sys/unistd.h b/components/libc/compilers/armlibc/sys/unistd.h index e1a1ad92f4..ee1e1c4db9 100644 --- a/components/libc/compilers/armlibc/sys/unistd.h +++ b/components/libc/compilers/armlibc/sys/unistd.h @@ -73,7 +73,11 @@ char * ttyname (int desc); unsigned int sleep(unsigned int seconds); int usleep(useconds_t usec); -uid_t getuid(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 */ diff --git a/components/libc/compilers/common/unistd.c b/components/libc/compilers/common/unistd.c index c7ad654da7..b3efc386e9 100644 --- a/components/libc/compilers/common/unistd.c +++ b/components/libc/compilers/common/unistd.c @@ -50,14 +50,38 @@ int usleep(useconds_t usec) } 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) { - return -1; + return 0; } 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); diff --git a/components/libc/compilers/dlib/sys/unistd.h b/components/libc/compilers/dlib/sys/unistd.h index 5ca56ad136..5b86822635 100644 --- a/components/libc/compilers/dlib/sys/unistd.h +++ b/components/libc/compilers/dlib/sys/unistd.h @@ -47,7 +47,11 @@ char * ttyname (int desc); unsigned int sleep(unsigned int seconds); int usleep(useconds_t usec); -uid_t getuid(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 */ |
