Skip to content

Commit d06420e

Browse files
committed
implement getuid and getpid
1 parent c21f018 commit d06420e

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

components/libc/compilers/armlibc/sys/unistd.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,7 @@ char * ttyname (int desc);
7373
unsigned int sleep(unsigned int seconds);
7474
int usleep(useconds_t usec);
7575

76+
uid_t getuid(void);
77+
pid_t getpid(void);
78+
7679
#endif /* _SYS_UNISTD_H */

components/libc/compilers/common/unistd.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,15 @@ int usleep(useconds_t usec)
4949
return 0;
5050
}
5151
RTM_EXPORT(usleep);
52+
53+
uid_t getuid(void)
54+
{
55+
return -1;
56+
}
57+
RTM_EXPORT(getuid);
58+
59+
pid_t getpid(void)
60+
{
61+
return -1;
62+
}
63+
RTM_EXPORT(getuid);

components/libc/compilers/dlib/sys/unistd.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,7 @@ char * ttyname (int desc);
4747
unsigned int sleep(unsigned int seconds);
4848
int usleep(useconds_t usec);
4949

50+
uid_t getuid(void);
51+
pid_t getpid(void);
52+
5053
#endif /* _SYS_UNISTD_H */

0 commit comments

Comments
 (0)