libc: Make gethostname as syscall instead of uname

simplify and symmetry the implementation in KERNEL/PROTECTED build

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iefdeea5f6ef6348c774b2ca9f7e45fe89c0c22dd
This commit is contained in:
Xiang Xiao
2020-07-28 17:52:17 +08:00
committed by Masayuki Ishikawa
parent 0a6c81b19c
commit 3cff139b85
4 changed files with 13 additions and 53 deletions
+1 -1
View File
@@ -30,6 +30,7 @@
"ftruncate","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","int","off_t"
"getenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","FAR char *","FAR const char *"
"getgid","unistd.h","defined(CONFIG_SCHED_USER_IDENTITY)","gid_t"
"gethostname","unistd.h","","int","FAR char *","size_t"
"getitimer","sys/time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","int","FAR struct itimerval *"
"getpeername","sys/socket.h","defined(CONFIG_NET)","int","int","FAR struct sockaddr *","FAR socklen_t *"
"getpid","unistd.h","","pid_t"
@@ -176,7 +177,6 @@
"tls_alloc","nuttx/tls.h","CONFIG_TLS_NELEM > 0","int"
"tls_free","nuttx/tls.h","CONFIG_TLS_NELEM > 0","int","int"
"umount2","sys/mount.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *","unsigned int"
"uname","sys/utsname.h","","int","FAR struct utsname *"
"unlink","unistd.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char *"
"unsetenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char *"
"up_assert","nuttx/arch.h","","void","FAR const char *","int"
1 _exit unistd.h void int
30 ftruncate unistd.h !defined(CONFIG_DISABLE_MOUNTPOINT) int int
31 getenv stdlib.h !defined(CONFIG_DISABLE_ENVIRON) FAR char * FAR const char *
32 getgid unistd.h defined(CONFIG_SCHED_USER_IDENTITY) gid_t
33 gethostname unistd.h int FAR char *
34 getitimer sys/time.h !defined(CONFIG_DISABLE_POSIX_TIMERS) int int
35 getpeername sys/socket.h defined(CONFIG_NET) int int
36 getpid unistd.h pid_t
177 tls_alloc nuttx/tls.h CONFIG_TLS_NELEM > 0 int
178 tls_free nuttx/tls.h CONFIG_TLS_NELEM > 0 int int
179 umount2 sys/mount.h !defined(CONFIG_DISABLE_MOUNTPOINT) int FAR const char *
uname sys/utsname.h int FAR struct utsname *
180 unlink unistd.h !defined(CONFIG_DISABLE_MOUNTPOINT) int FAR const char *
181 unsetenv stdlib.h !defined(CONFIG_DISABLE_ENVIRON) int FAR const char *
182 up_assert nuttx/arch.h void FAR const char *