diff mbox series

[01/30] socket: Add hidden prototype for setsockopt

Message ID 486f57e33e452c79f9b79c7232786b607d05fa20.1625251244.git.fweimer@redhat.com
State Superseded
Delegated to: Carlos O'Donell
Headers show
Series Move nss_dns into libc | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Florian Weimer July 2, 2021, 6:47 p.m. UTC
---
 include/sys/socket.h                 | 3 ++-
 sysdeps/mach/hurd/setsockopt.c       | 2 +-
 sysdeps/unix/sysv/linux/setsockopt.c | 5 +++--
 3 files changed, 6 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/include/sys/socket.h b/include/sys/socket.h
index 38a1f76b3b..a1d749f9fa 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -118,7 +118,8 @@  libc_hidden_proto (__recvmmsg64)
    Returns 0 on success, -1 for errors.  */
 extern int __setsockopt (int __fd, int __level, int __optname,
 			 const void *__optval,
-			 socklen_t __optlen) attribute_hidden;
+			 socklen_t __optlen);
+libc_hidden_proto (__setsockopt)
 
 /* Put the current value for socket FD's option OPTNAME at protocol level LEVEL
    into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
diff --git a/sysdeps/mach/hurd/setsockopt.c b/sysdeps/mach/hurd/setsockopt.c
index 283af7114c..165c085599 100644
--- a/sysdeps/mach/hurd/setsockopt.c
+++ b/sysdeps/mach/hurd/setsockopt.c
@@ -38,5 +38,5 @@  __setsockopt (int fd,
     return __hurd_dfail (fd, err);
   return 0;
 }
-
+libc_hidden_def (__setsockopt)
 weak_alias (__setsockopt, setsockopt)
diff --git a/sysdeps/unix/sysv/linux/setsockopt.c b/sysdeps/unix/sysv/linux/setsockopt.c
index a4780a9d33..6818c121cd 100644
--- a/sysdeps/unix/sysv/linux/setsockopt.c
+++ b/sysdeps/unix/sysv/linux/setsockopt.c
@@ -88,7 +88,7 @@  setsockopt32 (int fd, int level, int optname, const void *optval,
 #endif
 
 int
-setsockopt (int fd, int level, int optname, const void *optval, socklen_t len)
+__setsockopt (int fd, int level, int optname, const void *optval, socklen_t len)
 {
   int r = setsockopt_syscall (fd, level, optname, optval, len);
 
@@ -99,4 +99,5 @@  setsockopt (int fd, int level, int optname, const void *optval, socklen_t len)
 
   return r;
 }
-weak_alias (setsockopt, __setsockopt)
+libc_hidden_def (__setsockopt)
+weak_alias (__setsockopt, setsockopt)