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 time64 alias for setsockopt
Date: Thu, 22 Jul 2021 17:53:18 +0000 (GMT)	[thread overview]
Message-ID: <20210722175318.BB500398842D@sourceware.org> (raw)

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

commit f032ac3b838387c00210e6d8aefcb070360252ef
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Jul 22 19:12:13 2021 +0200

    socket: Add time64 alias for setsockopt
    
    Reviewed-by: Lukasz Majewski <lukma@denx.de>
    Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

Diff:
---
 socket/sys/socket.h                                         | 13 +++++++++++++
 sysdeps/unix/sysv/linux/Versions                            |  1 +
 sysdeps/unix/sysv/linux/arm/be/libc.abilist                 |  1 +
 sysdeps/unix/sysv/linux/arm/le/libc.abilist                 |  1 +
 sysdeps/unix/sysv/linux/csky/libc.abilist                   |  1 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist                   |  1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist                   |  1 +
 sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist          |  1 +
 sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist            |  1 +
 sysdeps/unix/sysv/linux/microblaze/be/libc.abilist          |  1 +
 sysdeps/unix/sysv/linux/microblaze/le/libc.abilist          |  1 +
 sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist        |  1 +
 sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist      |  1 +
 sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist        |  1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist                  |  1 +
 sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist  |  1 +
 .../unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist    |  1 +
 sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist           |  1 +
 sysdeps/unix/sysv/linux/setsockopt.c                        |  3 +++
 sysdeps/unix/sysv/linux/sh/be/libc.abilist                  |  1 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist                  |  1 +
 sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist          |  1 +
 22 files changed, 36 insertions(+)

diff --git a/socket/sys/socket.h b/socket/sys/socket.h
index b37c87e7df..bd14e7e3a5 100644
--- a/socket/sys/socket.h
+++ b/socket/sys/socket.h
@@ -273,8 +273,21 @@ extern int __getsockopt64 (int __fd, int __level, int __optname,
 /* Set socket FD's option OPTNAME at protocol level LEVEL
    to *OPTVAL (which is OPTLEN bytes long).
    Returns 0 on success, -1 for errors.  */
+#ifndef __USE_TIME_BITS64
 extern int setsockopt (int __fd, int __level, int __optname,
 		       const void *__optval, socklen_t __optlen) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT_NTH (setsockopt,
+			   (int __fd, int __level, int __optname,
+			    const void *__optval, socklen_t __optlen),
+			   __setsockopt64);
+# else
+extern int __setsockopt64 (int __fd, int __level, int __optname,
+			   const void *__optval, socklen_t __optlen) __THROW;
+#  define setsockopt __setsockopt64
+# endif
+#endif
 
 
 /* Prepare to accept connections on socket FD.
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 5ff450f476..26452f3f17 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -270,6 +270,7 @@ libc {
     __sendmmsg64;
     __sendmsg64;
     __setitimer64;
+    __setsockopt64;
     __settimeofday64;
     __shmctl64;
     __sigtimedwait64;
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index e03e92bb74..a426241965 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -271,6 +271,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 9ec8cc841b..02f80418cc 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -268,6 +268,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index e90ad23a66..b7676eb372 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2427,6 +2427,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 0d6e59094e..f6965c9d95 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2376,6 +2376,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 368d23caa7..2e7603d9ed 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2560,6 +2560,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 546f677736..c1e0ea9c10 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -272,6 +272,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 0ae3ce49d9..93161048ca 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2503,6 +2503,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 8a6be1fd97..0aaeec8a27 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2476,6 +2476,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index a53147b655..bec5f456c9 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2473,6 +2473,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index c5c6f29862..97d2127f78 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2468,6 +2468,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 0268a4ee79..acb0756c11 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2466,6 +2466,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 19fa4ba58f..ebc21dde1e 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2474,6 +2474,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index f40f94f27f..e5b6834f14 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2515,6 +2515,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 374685c8bb..132707c8ad 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2530,6 +2530,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index 3a1c2709e9..0af2be31a0 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2563,6 +2563,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index cd0dc210fa..c3fe78f77f 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2528,6 +2528,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/setsockopt.c b/sysdeps/unix/sysv/linux/setsockopt.c
index bb3017f89c..7cefbc2b48 100644
--- a/sysdeps/unix/sysv/linux/setsockopt.c
+++ b/sysdeps/unix/sysv/linux/setsockopt.c
@@ -103,3 +103,6 @@ __setsockopt (int fd, int level, int optname, const void *optval, socklen_t len)
 }
 libc_hidden_def (__setsockopt)
 weak_alias (__setsockopt, setsockopt)
+#if __TIMESIZE != 64
+weak_alias (__setsockopt, __setsockopt64)
+#endif
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 69dde2566f..dc502f6833 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2383,6 +2383,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 0b315be4be..cba1abb556 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2380,6 +2380,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index c74bc8b581..d4a516fb47 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2523,6 +2523,7 @@ GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
 GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
+GLIBC_2.34 __setsockopt64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
 GLIBC_2.34 __sigtimedwait64 F


                 reply	other threads:[~2021-07-22 17:53 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=20210722175318.BB500398842D@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).