public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] socket: Add hidden prototype for setsockopt
Date: Thu, 15 Jul 2021 08:10:09 +0000 (GMT)	[thread overview]
Message-ID: <20210715081009.DEB403AA941B@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b8f889064d02cedc90a109848190207a767a4913

commit b8f889064d02cedc90a109848190207a767a4913
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Jul 15 08:28:50 2021 +0200

    socket: Add hidden prototype for setsockopt
    
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
    Tested-by: Carlos O'Donell <carlos@redhat.com>

Diff:
---
 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 --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 2792f1b5a1..bb3017f89c 100644
--- a/sysdeps/unix/sysv/linux/setsockopt.c
+++ b/sysdeps/unix/sysv/linux/setsockopt.c
@@ -90,7 +90,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);
 
@@ -101,4 +101,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)


                 reply	other threads:[~2021-07-15  8:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210715081009.DEB403AA941B@sourceware.org \
    --to=fw@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).