From 37548c4afc768cfc37866d77fb141f43823d9010 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Tue, 2 Dec 2014 21:36:04 +0000 Subject: [PATCH] Alias sys_getpeername to sys_getsockname Since parsers for getpeername and getsockname syscalls are identical, replace sys_getpeername with an alias to sys_getsockname. * linux/dummy.h (sys_getpeername): Alias to sys_getsockname. * linux/syscall.h (sys_getpeername): Remove. * net.c (sys_getpeername): Remove. --- linux/dummy.h | 1 + linux/syscall.h | 1 - net.c | 6 ------ 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/linux/dummy.h b/linux/dummy.h index bf589ae0..9d1faf1b 100644 --- a/linux/dummy.h +++ b/linux/dummy.h @@ -65,6 +65,7 @@ #define sys_getegid sys_getuid #define sys_geteuid sys_getuid #define sys_getgid sys_getuid +#define sys_getpeername sys_getsockname #define sys_getresgid sys_getresuid #define sys_lstat sys_stat #define sys_lstat64 sys_stat64 diff --git a/linux/syscall.h b/linux/syscall.h index 88d42bd9..b7af6c5d 100644 --- a/linux/syscall.h +++ b/linux/syscall.h @@ -103,7 +103,6 @@ int sys_getgroups(); int sys_getgroups32(); int sys_gethostname(); int sys_getitimer(); -int sys_getpeername(); int sys_getpmsg(); /* TODO: non-Linux, remove? */ int sys_getpriority(); int sys_getresuid(); diff --git a/net.c b/net.c index 3bf0a9b4..0f88c429 100644 --- a/net.c +++ b/net.c @@ -915,12 +915,6 @@ sys_getsockname(struct tcb *tcp) return do_sockname(tcp, -1); } -int -sys_getpeername(struct tcb *tcp) -{ - return do_sockname(tcp, -1); -} - static int do_pipe(struct tcb *tcp, int flags_arg) { -- 2.40.0