unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: libc-alpha@sourceware.org
Subject: [PATCH 8/8] socket: Add time64 alias for setsockopt
Date: Mon, 19 Jul 2021 17:29:18 +0200	[thread overview]
Message-ID: <f1497c80f495f31be394d7471134071922870701.1626708388.git.fweimer@redhat.com> (raw)
In-Reply-To: <cover.1626708388.git.fweimer@redhat.com>

---
 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/hppa/syscalls.list          |  2 +-
 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 +
 .../unix/sysv/linux/mips/mips32/fpu/libc.abilist    |  1 +
 .../unix/sysv/linux/mips/mips32/nofpu/libc.abilist  |  1 +
 .../unix/sysv/linux/mips/mips64/n32/libc.abilist    |  1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist          |  1 +
 .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist   |  1 +
 .../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 +
 23 files changed, 37 insertions(+), 1 deletion(-)

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 cb5615f428..f44b16f3de 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 88c3db4560..6217997baa 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 ea727e1956..f8ff5e747b 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2378,6 +2378,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/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index 043d884bf9..2e8fb29bb8 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -1,5 +1,5 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
-
+soc
 # proper socket implementations:
 bind		-	bind		i:ipi	__bind		bind
 getpeername	-	getpeername	i:ipp	__getpeername	getpeername
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index f53a44f7ca..8e707af79a 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2562,6 +2562,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 c86910563a..2e88a2a996 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 c7fe3b31e7..1794c76cd4 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2505,6 +2505,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 3c8ed8d962..1a297fbf9e 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2478,6 +2478,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 cc3a28054d..36cf30deb5 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2475,6 +2475,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 49bc91ab6a..34ea962247 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2470,6 +2470,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 853a61f3db..22354c5799 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/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/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 28917895bd..b7d6d9414e 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/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/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index e4d4ea4d26..7bb0ec4ed6 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2517,6 +2517,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 22b7f8604d..5e9087079d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2532,6 +2532,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 8b49bcfe32..0c9cc83df3 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2565,6 +2565,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 97939a88ee..cb15385c69 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/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/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 a56b7ddd00..c8f397c8fa 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2385,6 +2385,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 c043e9b58f..e78accd62c 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2382,6 +2382,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 ebd2acd9e4..a7d2467635 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2525,6 +2525,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
-- 
2.31.1


  parent reply	other threads:[~2021-07-19 15:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19 15:28 [PATCH v2 0/8] Additional time64 system call wrappers Florian Weimer via Libc-alpha
2021-07-19 15:28 ` [PATCH 1/8] misc: Add time64 alias for ioctl Florian Weimer via Libc-alpha
2021-07-19 15:28 ` [PATCH 2/8] io: Add time64 alias for fcntl Florian Weimer via Libc-alpha
2021-07-19 15:28 ` [PATCH 3/8] Linux: Add time64 alias for prctl Florian Weimer via Libc-alpha
2021-07-19 15:28 ` [PATCH 4/8] socket: Add time64 alias for sendmmsg Florian Weimer via Libc-alpha
2021-07-19 15:28 ` [PATCH 5/8] socket: Add time64 alias for recvmsg Florian Weimer via Libc-alpha
2021-07-19 15:29 ` [PATCH 6/8] socket: Add time64 alias for sendmsg Florian Weimer via Libc-alpha
2021-07-19 15:29 ` [PATCH 7/8] socket: Add time64 alias for getsockopt Florian Weimer via Libc-alpha
2021-07-21 20:19   ` Adhemerval Zanella via Libc-alpha
2021-07-19 15:29 ` Florian Weimer via Libc-alpha [this message]
2021-07-21 20:18   ` [PATCH 8/8] socket: Add time64 alias for setsockopt Adhemerval Zanella via Libc-alpha
  -- strict thread matches above, loose matches on Subject: below --
2021-07-05 13:41 [PATCH 0/8] Additional time64 aliases Florian Weimer via Libc-alpha
2021-07-05 13:42 ` [PATCH 8/8] socket: Add time64 alias for setsockopt Florian Weimer via Libc-alpha
2021-07-20  9:15   ` Lukasz Majewski
2021-07-20  9:18     ` Florian Weimer via Libc-alpha
2021-07-21 20:10   ` Adhemerval Zanella via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=f1497c80f495f31be394d7471134071922870701.1626708388.git.fweimer@redhat.com \
    --to=libc-alpha@sourceware.org \
    --cc=fweimer@redhat.com \
    /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).