From patchwork Mon Jul 19 15:28:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 44395 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C866C3954C16 for ; Mon, 19 Jul 2021 15:30:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C866C3954C16 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626708634; bh=Kw9zz/8HRbsuQGe8uFaGyv5BPk0fxEIuJ63D7TiDGV8=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=YhrCoB39q4A6lWTbn/6lgUqZFSUAAfLgnTCxaZ3S3viyHd8PIaVThyq+bP3mQxhcf duwoLbRZQKgIJY7aV7M7Az4EUThrsfNWwGjbfJQCT4yiVXVm59rVaCKsLqplQjv/B3 5OyZwJz1L/yRkfBZQybC2bzDrqyDApWecAmzKmRY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 8C7463954C13 for ; Mon, 19 Jul 2021 15:28:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8C7463954C13 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-274-WJgHu4Y4MWK5wjTeBHhnMg-1; Mon, 19 Jul 2021 11:28:38 -0400 X-MC-Unique: WJgHu4Y4MWK5wjTeBHhnMg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3D4081084F4B for ; Mon, 19 Jul 2021 15:28:37 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-73.phx2.redhat.com [10.3.112.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 315E05D6BA for ; Mon, 19 Jul 2021 15:28:35 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 1/8] misc: Add time64 alias for ioctl In-Reply-To: References: X-From-Line: 71a94cc3b68d6a6e17f9cb8e632450a1a09d23e4 Mon Sep 17 00:00:00 2001 Message-Id: <71a94cc3b68d6a6e17f9cb8e632450a1a09d23e4.1626708388.git.fweimer@redhat.com> Date: Mon, 19 Jul 2021 17:28:33 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- misc/Makefile | 7 +++- misc/sys/ioctl.h | 10 +++++ misc/tst-ioctl-time64.c | 1 + misc/tst-ioctl.c | 41 +++++++++++++++++++ sysdeps/unix/syscalls.list | 2 +- sysdeps/unix/sysv/linux/Versions | 2 + 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 + .../sysv/linux/m68k/coldfire/libc.abilist | 1 + .../unix/sysv/linux/m68k/m680x0/libc.abilist | 1 + .../sysv/linux/microblaze/be/libc.abilist | 1 + .../sysv/linux/microblaze/le/libc.abilist | 1 + .../sysv/linux/mips/mips32/fpu/libc.abilist | 1 + .../sysv/linux/mips/mips32/nofpu/libc.abilist | 1 + .../sysv/linux/mips/mips64/n32/libc.abilist | 1 + sysdeps/unix/sysv/linux/nios2/libc.abilist | 1 + sysdeps/unix/sysv/linux/powerpc/ioctl.c | 3 ++ .../linux/powerpc/powerpc32/fpu/libc.abilist | 1 + .../powerpc/powerpc32/nofpu/libc.abilist | 1 + .../unix/sysv/linux/s390/s390-32/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/be/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/le/libc.abilist | 1 + .../sysv/linux/sparc/sparc32/libc.abilist | 1 + 26 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 misc/tst-ioctl-time64.c create mode 100644 misc/tst-ioctl.c diff --git a/misc/Makefile b/misc/Makefile index ae03e26f1b..22923efde9 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -88,11 +88,14 @@ tests := tst-dirname tst-tsearch tst-fdset tst-mntent tst-hsearch \ tst-preadvwritev tst-preadvwritev64 tst-makedev tst-empty \ tst-preadvwritev2 tst-preadvwritev64v2 tst-warn-wide \ tst-ldbl-warn tst-ldbl-error tst-dbl-efgcvt tst-ldbl-efgcvt \ - tst-mntent-autofs tst-syscalls tst-mntent-escape tst-select + tst-mntent-autofs tst-syscalls tst-mntent-escape tst-select \ + tst-ioctl tests-time64 := \ tst-select-time64 \ - tst-pselect-time64 + tst-pselect-time64 \ + tst-ioctl-time64 \ + # tests-time64 # Tests which need libdl. ifeq (yes,$(build-shared)) diff --git a/misc/sys/ioctl.h b/misc/sys/ioctl.h index ddd204d95f..6884d9925f 100644 --- a/misc/sys/ioctl.h +++ b/misc/sys/ioctl.h @@ -38,7 +38,17 @@ __BEGIN_DECLS /* Perform the I/O control operation specified by REQUEST on FD. One argument may follow; its presence and type depend on REQUEST. Return value depends on REQUEST. Usually -1 indicates error. */ +#ifndef __USE_TIME_BITS64 extern int ioctl (int __fd, unsigned long int __request, ...) __THROW; +#else +# ifdef __REDIRECT +extern int __REDIRECT (ioctl, (int __fd, unsigned long int __request, ...), + __ioctl_time64) __THROW; +# else +extern int __ioctl_time64 (int __fd, unsigned long int __request, ...) __THROW; +# define ioctl __ioctl_time64 +# endif +#endif __END_DECLS diff --git a/misc/tst-ioctl-time64.c b/misc/tst-ioctl-time64.c new file mode 100644 index 0000000000..c73e8f649b --- /dev/null +++ b/misc/tst-ioctl-time64.c @@ -0,0 +1 @@ +#include "tst-ioctl.c" diff --git a/misc/tst-ioctl.c b/misc/tst-ioctl.c new file mode 100644 index 0000000000..a09b8ae836 --- /dev/null +++ b/misc/tst-ioctl.c @@ -0,0 +1,41 @@ +/* Smoke test for ioctl. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include +#include + +static int +do_test (void) +{ + int pair[2]; + TEST_COMPARE (socketpair (AF_UNIX, SOCK_STREAM, 0, pair), 0); + TEST_COMPARE (write (pair[0], "buffer", sizeof ("buffer")), + sizeof ("buffer")); + int value; + TEST_COMPARE (ioctl (pair[1], FIONREAD, &value), 0); + TEST_COMPARE (value, sizeof ("buffer")); + TEST_COMPARE (ioctl (pair[0], FIONREAD, &value), 0); + TEST_COMPARE (value, 0); + xclose (pair[0]); + xclose (pair[1]); + return 0; +} + +#include diff --git a/sysdeps/unix/syscalls.list b/sysdeps/unix/syscalls.list index 341eec20f1..10bd409eef 100644 --- a/sysdeps/unix/syscalls.list +++ b/sysdeps/unix/syscalls.list @@ -32,7 +32,7 @@ getrlimit - getrlimit i:ip __getrlimit getrlimit getsockname - getsockname i:ibN __getsockname getsockname getsockopt - getsockopt i:iiiBN getsockopt getuid - getuid Ei: __getuid getuid -ioctl - ioctl i:iiI __ioctl ioctl +ioctl - ioctl i:iiI __ioctl ioctl __ioctl_time64 kill - kill i:ii __kill kill link - link i:ss __link link listen - listen i:ii __listen listen diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index 4884216825..4f0e167dd4 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -209,6 +209,7 @@ libc { __ctime64; __ctime64_r; __difftime64; + __fcntl_time64; __fstat64_time64; __fstatat64_time64; __futimens64; @@ -229,6 +230,7 @@ libc { __globfree64_time64; __gmtime64; __gmtime64_r; + __ioctl_time64; __localtime64; __localtime64_r; __lstat64_time64; diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index 1e73617837..bfb5d09693 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -222,6 +222,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index 2bd1f4a0f4..cd64167174 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -219,6 +219,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index 0b3a2310f4..121e5ad9f5 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2378,6 +2378,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index 230eb0c85a..1ef566907a 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2329,6 +2329,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index d58620d817..287cd4e574 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2512,6 +2512,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __isnanf128 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index 9b9d0dff9d..f01a129159 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -223,6 +223,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index 6d48dc726c..beb2453809 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2456,6 +2456,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index 6abbed158e..5ab2304162 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2429,6 +2429,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index 8b9ae1f072..c3a61c96f0 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2426,6 +2426,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index 095c2ea5da..1e66953b64 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2421,6 +2421,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index bc1a353726..cd26df6cc0 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2419,6 +2419,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index 63db2192c9..a5002c8f67 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2427,6 +2427,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index 2303e12935..04f33cafcb 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2468,6 +2468,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/powerpc/ioctl.c b/sysdeps/unix/sysv/linux/powerpc/ioctl.c index 1ee9d19d4d..a81c7ba54c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/ioctl.c +++ b/sysdeps/unix/sysv/linux/powerpc/ioctl.c @@ -63,3 +63,6 @@ __ioctl (int fd, unsigned long int request, ...) } libc_hidden_def (__ioctl) weak_alias (__ioctl, ioctl) +#if __TIMESIZE != 64 +weak_alias (__ioctl, __ioctl_time64) +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index b51067a81f..089577f914 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2483,6 +2483,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index c5112da9e5..fc97125521 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2516,6 +2516,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index f803a1093c..e16ddd9010 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2481,6 +2481,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index fcb9c99713..343784350d 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2336,6 +2336,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index aa294c7685..4e7c6bac01 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2333,6 +2333,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index f5f6bf24fd..9274380630 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2476,6 +2476,7 @@ GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F GLIBC_2.34 __gmtime64 F GLIBC_2.34 __gmtime64_r F +GLIBC_2.34 __ioctl_time64 F GLIBC_2.34 __libc_start_main F GLIBC_2.34 __localtime64 F GLIBC_2.34 __localtime64_r F From patchwork Mon Jul 19 15:28:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 44396 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B0EA73954C25 for ; Mon, 19 Jul 2021 15:31:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B0EA73954C25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626708679; bh=/hipoN0hq6rC6marnAOG4VxEuSIV/7+lCmQR+Zhu9fk=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=J5AG6AMv5zZIxuzNOPowOFNp1pKHbeqwxHQMTmRX7fL0CzjgPOqIMKXJa4ADGeYdD cfF01EyB6vw17b58wHcLdmin/Fl4ChBbnu9+bl/AadOLbvLgfi4YMnSY4erXFuwDV0 JgHNwUZYOFG/1wR4Qx9CvfzVwYPA29+iqvKgX6vE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 035D53953826 for ; Mon, 19 Jul 2021 15:28:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 035D53953826 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-322-OxWNEu5PPf6WGqz174SINA-1; Mon, 19 Jul 2021 11:28:43 -0400 X-MC-Unique: OxWNEu5PPf6WGqz174SINA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 25BCB1084F4B for ; Mon, 19 Jul 2021 15:28:42 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-73.phx2.redhat.com [10.3.112.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C1C15C1C5 for ; Mon, 19 Jul 2021 15:28:40 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 2/8] io: Add time64 alias for fcntl In-Reply-To: References: X-From-Line: 776858146560e1148ce0bad55097f88f441dcdb6 Mon Sep 17 00:00:00 2001 Message-Id: <776858146560e1148ce0bad55097f88f441dcdb6.1626708388.git.fweimer@redhat.com> Date: Mon, 19 Jul 2021 17:28:38 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- io/Makefile | 2 ++ io/fcntl.h | 27 ++++++++++++++----- io/tst-fcntl-time64.c | 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/fcntl64.c | 3 +++ sysdeps/unix/sysv/linux/hppa/libc.abilist | 1 + sysdeps/unix/sysv/linux/i386/libc.abilist | 1 + .../sysv/linux/m68k/coldfire/libc.abilist | 1 + .../unix/sysv/linux/m68k/m680x0/libc.abilist | 1 + .../sysv/linux/microblaze/be/libc.abilist | 1 + .../sysv/linux/microblaze/le/libc.abilist | 1 + .../sysv/linux/mips/mips32/fpu/libc.abilist | 1 + .../sysv/linux/mips/mips32/nofpu/libc.abilist | 1 + .../sysv/linux/mips/mips64/n32/libc.abilist | 1 + sysdeps/unix/sysv/linux/nios2/libc.abilist | 1 + .../linux/powerpc/powerpc32/fpu/libc.abilist | 1 + .../powerpc/powerpc32/nofpu/libc.abilist | 1 + .../unix/sysv/linux/s390/s390-32/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/be/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/le/libc.abilist | 1 + .../sysv/linux/sparc/sparc32/libc.abilist | 1 + 23 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 io/tst-fcntl-time64.c diff --git a/io/Makefile b/io/Makefile index ebb7d56d67..9871ecbc74 100644 --- a/io/Makefile +++ b/io/Makefile @@ -90,6 +90,8 @@ tests-time64 := \ tst-utime-time64 \ tst-utimensat-time64 \ tst-utimes-time64 \ + tst-fcntl-time64 \ + # tests-time64 # Likewise for statx, but we do not need static linking here. tests-internal += tst-statx tst-file_change_detection diff --git a/io/fcntl.h b/io/fcntl.h index f3b5e0ef77..8917a73b42 100644 --- a/io/fcntl.h +++ b/io/fcntl.h @@ -172,17 +172,30 @@ typedef __pid_t pid_t; This function is a cancellation point and therefore not marked with __THROW. */ -#ifndef __USE_FILE_OFFSET64 +#ifndef __USE_TIME_BITS64 +# ifndef __USE_FILE_OFFSET64 extern int fcntl (int __fd, int __cmd, ...); -#else -# ifdef __REDIRECT -extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64); # else -# define fcntl fcntl64 +# ifdef __REDIRECT +extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64); +# else +# define fcntl fcntl64 +# endif # endif -#endif -#ifdef __USE_LARGEFILE64 +# ifdef __USE_LARGEFILE64 extern int fcntl64 (int __fd, int __cmd, ...); +# endif +#else /* __USE_TIME_BITS64 */ +# ifdef __REDIRECT +extern int __REDIRECT (fcntl, (int __fd, int __request, ...), + __fcntl_time64) __THROW; +extern int __REDIRECT (fcntl64, (int __fd, int __request, ...), + __fcntl_time64) __THROW; +# else +extern int __fcntl_time64 (int __fd, int __request, ...) __THROW; +# define fcntl64 __fcntl_time64 +# define fcntl __fcntl_time64 +# endif #endif /* Open FILE and return a new file descriptor for it, or -1 on error. diff --git a/io/tst-fcntl-time64.c b/io/tst-fcntl-time64.c new file mode 100644 index 0000000000..ef4a5182cb --- /dev/null +++ b/io/tst-fcntl-time64.c @@ -0,0 +1 @@ +#include "tst-fcntl.c" diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index bfb5d09693..225cd17730 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -203,6 +203,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index cd64167174..3731f38a0b 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -200,6 +200,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index 121e5ad9f5..6678218715 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2359,6 +2359,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/fcntl64.c b/sysdeps/unix/sysv/linux/fcntl64.c index ed19c327b9..e65233de4b 100644 --- a/sysdeps/unix/sysv/linux/fcntl64.c +++ b/sysdeps/unix/sysv/linux/fcntl64.c @@ -54,6 +54,9 @@ libc_hidden_def (__libc_fcntl64) weak_alias (__libc_fcntl64, __fcntl64) libc_hidden_weak (__fcntl64) weak_alias (__libc_fcntl64, fcntl64) +#if __TIMESIZE != 64 +weak_alias (__libc_fcntl64, __fcntl_time64) +#endif #ifdef __OFF_T_MATCHES_OFF64_T weak_alias (__libc_fcntl64, __libc_fcntl) diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index 1ef566907a..8f105d3de5 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2310,6 +2310,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index 287cd4e574..53ddabd021 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2493,6 +2493,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index f01a129159..23168e8042 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -204,6 +204,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index beb2453809..a63ac5624b 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2437,6 +2437,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index 5ab2304162..f9f6dfb8b5 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2410,6 +2410,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index c3a61c96f0..97d03fae0c 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2407,6 +2407,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index 1e66953b64..0deeb17651 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2402,6 +2402,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index cd26df6cc0..55432c52b7 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2400,6 +2400,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index a5002c8f67..daa0d49906 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2408,6 +2408,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index 04f33cafcb..36dcfc8839 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2449,6 +2449,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 089577f914..8283409237 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2464,6 +2464,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index fc97125521..590eda0af6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2497,6 +2497,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index e16ddd9010..08b02158a1 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2462,6 +2462,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index 343784350d..416db82cbd 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2317,6 +2317,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index 4e7c6bac01..6be813c3db 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2314,6 +2314,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index 9274380630..ce61dd9556 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2457,6 +2457,7 @@ GLIBC_2.34 __cnd_timedwait64 F GLIBC_2.34 __ctime64 F GLIBC_2.34 __ctime64_r F GLIBC_2.34 __difftime64 F +GLIBC_2.34 __fcntl_time64 F GLIBC_2.34 __fstat64_time64 F GLIBC_2.34 __fstatat64_time64 F GLIBC_2.34 __fts64_children_time64 F From patchwork Mon Jul 19 15:28:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 44397 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 752DF39551CC for ; Mon, 19 Jul 2021 15:32:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 752DF39551CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626708730; bh=snPIusXF1fA9kJFMr2BYAvAcSIMnag9xUGBMZMfQv74=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ulOWyVoSz1agpONIrXOrO8qXwz9sIny70RtM7DWesVKIUaD5xMjREvAIX5U69TmY6 hwy1dPtz9FWvk2kTKt6N4Pj8Qq5ra+VIZEZmNlQbC27/e4kBhre8TWSRPJQWMJOz1x LJHJFNGSS9wcRn46T0zNaW7rEAFSjCxmLTcCwpPY= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 36C7C395447D for ; Mon, 19 Jul 2021 15:28:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 36C7C395447D Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-335-hxKxW06qM6SVV8g2xLkX1g-1; Mon, 19 Jul 2021 11:28:50 -0400 X-MC-Unique: hxKxW06qM6SVV8g2xLkX1g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9AF3DC7403 for ; Mon, 19 Jul 2021 15:28:49 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-73.phx2.redhat.com [10.3.112.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8DE385C1C5 for ; Mon, 19 Jul 2021 15:28:48 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 3/8] Linux: Add time64 alias for prctl In-Reply-To: References: X-From-Line: 2c44ec29cd9382b40b8b0536e137cf6d3d69b140 Mon Sep 17 00:00:00 2001 Message-Id: <2c44ec29cd9382b40b8b0536e137cf6d3d69b140.1626708388.git.fweimer@redhat.com> Date: Mon, 19 Jul 2021 17:28:46 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- sysdeps/unix/sysv/linux/Makefile | 6 +++- 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 + .../sysv/linux/m68k/coldfire/libc.abilist | 1 + .../unix/sysv/linux/m68k/m680x0/libc.abilist | 1 + .../sysv/linux/microblaze/be/libc.abilist | 1 + .../sysv/linux/microblaze/le/libc.abilist | 1 + .../sysv/linux/mips/mips32/fpu/libc.abilist | 1 + .../sysv/linux/mips/mips32/nofpu/libc.abilist | 1 + .../sysv/linux/mips/mips64/n32/libc.abilist | 1 + sysdeps/unix/sysv/linux/nios2/libc.abilist | 1 + .../linux/powerpc/powerpc32/fpu/libc.abilist | 1 + .../powerpc/powerpc32/nofpu/libc.abilist | 1 + sysdeps/unix/sysv/linux/prctl.c | 3 ++ .../unix/sysv/linux/s390/s390-32/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/be/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/le/libc.abilist | 1 + .../sysv/linux/sparc/sparc32/libc.abilist | 1 + sysdeps/unix/sysv/linux/sys/prctl.h | 10 ++++++ sysdeps/unix/sysv/linux/tst-prctl-time64.c | 1 + sysdeps/unix/sysv/linux/tst-prctl.c | 33 +++++++++++++++++++ 25 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/tst-prctl-time64.c create mode 100644 sysdeps/unix/sysv/linux/tst-prctl.c diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index cceb16be05..123f15c2e3 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -120,7 +120,9 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ tst-timerfd tst-ppoll \ tst-clock_adjtime tst-adjtimex tst-ntp_adjtime tst-ntp_gettime \ tst-ntp_gettimex tst-sigtimedwait tst-misalign-clone \ - tst-close_range + tst-close_range \ + tst-prctl \ + # tests # Test for the symbol version of fcntl that was replaced in glibc 2.28. ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes) @@ -138,6 +140,8 @@ tests-time64 += \ tst-ppoll-time64 \ tst-sigtimedwait-time64 \ tst-timerfd-time64 \ + tst-prctl-time64 \ + # tests-time64 tests-clone-internal = \ tst-align-clone-internal \ diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index 4f0e167dd4..cff3d476da 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -245,6 +245,7 @@ libc { __ntp_gettime64; __ntp_gettimex64; __ppoll64; + __prctl_time64; __pselec64; __pselect64; __pthread_clockjoin_np64; diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index 225cd17730..a108dccfe9 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -240,6 +240,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index 3731f38a0b..3511d35f5e 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -237,6 +237,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index 6678218715..40342891a5 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2396,6 +2396,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index 8f105d3de5..1502aaddd4 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2347,6 +2347,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index 53ddabd021..70a0f7f1c3 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2531,6 +2531,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index 23168e8042..13ac607c49 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -241,6 +241,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index a63ac5624b..662a519095 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2474,6 +2474,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index f9f6dfb8b5..fc0c6b6acc 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2447,6 +2447,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index 97d03fae0c..56a52de049 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2444,6 +2444,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index 0deeb17651..4aa9e33b7d 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2439,6 +2439,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index 55432c52b7..1c1227301b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2437,6 +2437,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index daa0d49906..876893455e 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2445,6 +2445,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index 36dcfc8839..dc41e17487 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2486,6 +2486,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 8283409237..9e3311a978 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2501,6 +2501,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index 590eda0af6..2ac6aa068f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2534,6 +2534,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/prctl.c b/sysdeps/unix/sysv/linux/prctl.c index 85ad4cdd83..2af7b307ef 100644 --- a/sysdeps/unix/sysv/linux/prctl.c +++ b/sysdeps/unix/sysv/linux/prctl.c @@ -40,3 +40,6 @@ __prctl (int option, ...) libc_hidden_def (__prctl) weak_alias (__prctl, prctl) +#if __TIMESIZE != 64 +weak_alias (__prctl, __prctl_time64) +#endif diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index 08b02158a1..644f6b734c 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2499,6 +2499,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index 416db82cbd..369dccc4af 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2354,6 +2354,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index 6be813c3db..4254360898 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2351,6 +2351,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index ce61dd9556..31f43ed414 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2494,6 +2494,7 @@ GLIBC_2.34 __nftw64_time64 F GLIBC_2.34 __ntp_gettime64 F GLIBC_2.34 __ntp_gettimex64 F GLIBC_2.34 __ppoll64 F +GLIBC_2.34 __prctl_time64 F GLIBC_2.34 __pselect64 F GLIBC_2.34 __pthread_cleanup_routine F GLIBC_2.34 __pthread_clockjoin_np64 F diff --git a/sysdeps/unix/sysv/linux/sys/prctl.h b/sysdeps/unix/sysv/linux/sys/prctl.h index c9048c7cdb..db88938b3a 100644 --- a/sysdeps/unix/sysv/linux/sys/prctl.h +++ b/sysdeps/unix/sysv/linux/sys/prctl.h @@ -38,7 +38,17 @@ __BEGIN_DECLS /* Control process execution. */ +#ifndef __USE_TIME_BITS64 extern int prctl (int __option, ...) __THROW; +#else +# ifdef __REDIRECT +extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW; +# else +extern int __prctl_time64 (int __option,d ...) __THROW; +# define ioctl __prctl_time64 +# endif +#endif + __END_DECLS diff --git a/sysdeps/unix/sysv/linux/tst-prctl-time64.c b/sysdeps/unix/sysv/linux/tst-prctl-time64.c new file mode 100644 index 0000000000..d233e12bf4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tst-prctl-time64.c @@ -0,0 +1 @@ +#include "tst-prctl.c" diff --git a/sysdeps/unix/sysv/linux/tst-prctl.c b/sysdeps/unix/sysv/linux/tst-prctl.c new file mode 100644 index 0000000000..a9dd1dcd85 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tst-prctl.c @@ -0,0 +1,33 @@ +/* Smoke test for prctl. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include + +static int +do_test (void) +{ + TEST_COMPARE (prctl (PR_SET_NAME, "thread name", 0, 0, 0), 0); + char buffer[16] = { 0, }; + TEST_COMPARE (prctl (PR_GET_NAME, buffer, 0, 0, 0), 0); + char expected[16] = "thread name"; + TEST_COMPARE_BLOB (buffer, sizeof (buffer), expected, sizeof (expected)); + return 0; +} + +#include From patchwork Mon Jul 19 15:28:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 44398 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 84EC639551CC for ; Mon, 19 Jul 2021 15:32:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 84EC639551CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626708775; bh=blF2OcL1yMrtEzxiIaSIloq3a5KuQzKzFT3NNId+ZLM=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=DX+X+B/6AEe/GGZaA/HNkeq5peEQqfBnS+3FGdz3ogqsxIvxu8gSHXSZhxtToYJPC dF750xIYskR4THjlbPa7uPckwul9U5o6rlK5YjQaB4j2s26reef7Sg2jRkLLInHgMK 5Ibtj9IBCDPH2GfgQqeNCYndMEtlIB07nzWTJfKA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 745B03953C17 for ; Mon, 19 Jul 2021 15:28:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 745B03953C17 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-aRBqUx1TNh27Nv8GT08VDw-1; Mon, 19 Jul 2021 11:28:55 -0400 X-MC-Unique: aRBqUx1TNh27Nv8GT08VDw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6F39D100C661 for ; Mon, 19 Jul 2021 15:28:54 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-73.phx2.redhat.com [10.3.112.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6078A19C44 for ; Mon, 19 Jul 2021 15:28:53 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 4/8] socket: Add time64 alias for sendmmsg In-Reply-To: References: X-From-Line: edf40823209004edcb09d8010bb90707246be9d5 Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 19 Jul 2021 17:28:51 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- socket/sys/socket.h | 14 +- sysdeps/unix/sysv/linux/Makefile | 2 + 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 + .../sysv/linux/m68k/coldfire/libc.abilist | 1 + .../unix/sysv/linux/m68k/m680x0/libc.abilist | 1 + .../sysv/linux/microblaze/be/libc.abilist | 1 + .../sysv/linux/microblaze/le/libc.abilist | 1 + .../sysv/linux/mips/mips32/fpu/libc.abilist | 1 + .../sysv/linux/mips/mips32/nofpu/libc.abilist | 1 + .../sysv/linux/mips/mips64/n32/libc.abilist | 1 + sysdeps/unix/sysv/linux/nios2/libc.abilist | 1 + .../linux/powerpc/powerpc32/fpu/libc.abilist | 1 + .../powerpc/powerpc32/nofpu/libc.abilist | 1 + .../unix/sysv/linux/s390/s390-32/libc.abilist | 1 + sysdeps/unix/sysv/linux/sendmmsg.c | 3 + sysdeps/unix/sysv/linux/sh/be/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/le/libc.abilist | 1 + .../sysv/linux/sparc/sparc32/libc.abilist | 1 + .../unix/sysv/linux/tst-scm_rights-time64.c | 1 + sysdeps/unix/sysv/linux/tst-scm_rights.c | 186 ++++++++++++++++++ 25 files changed, 225 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/tst-scm_rights-time64.c create mode 100644 sysdeps/unix/sysv/linux/tst-scm_rights.c diff --git a/socket/sys/socket.h b/socket/sys/socket.h index 5577e75b80..d02d976bb5 100644 --- a/socket/sys/socket.h +++ b/socket/sys/socket.h @@ -179,9 +179,21 @@ extern ssize_t sendmsg (int __fd, const struct msghdr *__message, This function is a cancellation point and therefore not marked with __THROW. */ +# ifndef __USE_TIME_BITS64 extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags); -#endif +# else +# ifdef __REDIRECT +extern int __REDIRECT (sendmmsg, (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags), + __sendmmsg64); +# else +extern int __sendmmsg64 (int __fd, struct mmsghdr *__vmessages, + unsigned int __vlen, int __flags); +# define sendmmsg __sendmmsg64 +# endif +# endif /* __USE_TIME_BITS64 */ +#endif /* __USE_GNU */ /* Receive a message as described by MESSAGE from socket FD. Returns the number of bytes read or -1 for errors. diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 123f15c2e3..76ad06361c 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -122,6 +122,7 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ tst-ntp_gettimex tst-sigtimedwait tst-misalign-clone \ tst-close_range \ tst-prctl \ + tst-scm_rights \ # tests # Test for the symbol version of fcntl that was replaced in glibc 2.28. @@ -141,6 +142,7 @@ tests-time64 += \ tst-sigtimedwait-time64 \ tst-timerfd-time64 \ tst-prctl-time64 \ + tst-scm_rights-time64 \ # tests-time64 tests-clone-internal = \ diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index cff3d476da..a8ec041371 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -265,6 +265,7 @@ libc { __semctl64; __semtimedop64; __sem_timedwait64; + __sendmmsg64; __setitimer64; __settimeofday64; __shmctl64; diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index a108dccfe9..740081f235 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -266,6 +266,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index 3511d35f5e..55f17e1ee3 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -263,6 +263,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index 40342891a5..610f59aad7 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2422,6 +2422,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index 1502aaddd4..3c6ce135e2 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2373,6 +2373,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index 70a0f7f1c3..2fae97c00c 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2557,6 +2557,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index 13ac607c49..c146c01b62 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -267,6 +267,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index 662a519095..dc23970913 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2500,6 +2500,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index fc0c6b6acc..63b86f4613 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2473,6 +2473,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index 56a52de049..4f2811c869 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2470,6 +2470,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index 4aa9e33b7d..b3491fd1db 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2465,6 +2465,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index 1c1227301b..7d56039df5 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2463,6 +2463,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index 876893455e..0898b26a90 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2471,6 +2471,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index dc41e17487..19b42df933 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2512,6 +2512,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 9e3311a978..09179d2a48 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2527,6 +2527,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index 2ac6aa068f..d45be8ab9e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2560,6 +2560,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index 644f6b734c..c290ae4948 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2525,6 +2525,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/sendmmsg.c b/sysdeps/unix/sysv/linux/sendmmsg.c index 6093e9ed70..10aaff4d1f 100644 --- a/sysdeps/unix/sysv/linux/sendmmsg.c +++ b/sysdeps/unix/sysv/linux/sendmmsg.c @@ -35,3 +35,6 @@ __sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags) } libc_hidden_def (__sendmmsg) weak_alias (__sendmmsg, sendmmsg) +#if __TIMESIZE != 64 +weak_alias (__sendmmsg, __sendmmsg64) +#endif diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index 369dccc4af..714f7d4f55 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2380,6 +2380,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index 4254360898..9f858a4f68 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2377,6 +2377,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index 31f43ed414..2420775e21 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2520,6 +2520,7 @@ GLIBC_2.34 __sem_clockwait64 F GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F +GLIBC_2.34 __sendmmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/tst-scm_rights-time64.c b/sysdeps/unix/sysv/linux/tst-scm_rights-time64.c new file mode 100644 index 0000000000..302613cbfa --- /dev/null +++ b/sysdeps/unix/sysv/linux/tst-scm_rights-time64.c @@ -0,0 +1 @@ +#include "tst-scm_rights.c" diff --git a/sysdeps/unix/sysv/linux/tst-scm_rights.c b/sysdeps/unix/sysv/linux/tst-scm_rights.c new file mode 100644 index 0000000000..c85b873125 --- /dev/null +++ b/sysdeps/unix/sysv/linux/tst-scm_rights.c @@ -0,0 +1,186 @@ +/* Smoke test for SCM_RIGHTS. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This test passes a file descriptor from a subprocess to the parent + process, using recvmsg/sendmsg or recvmmsg/sendmmsg. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* String sent over the socket. */ +static char DATA[] = "descriptor"; + +/* Path that is to be opened and sent over the socket. */ +#define PATH "/etc" + +/* True if sendmmsg/recvmmsg is to be used. */ +static bool use_multi_call; + +/* The pair of sockets used for coordination. The subprocess uses + sockets[1]. */ +static int sockets[2]; + +/* Subprocess side of one send/receive test. */ +_Noreturn static void +subprocess (void) +{ + /* The file descriptor to send. */ + int fd = xopen (PATH, O_RDONLY, 0); + + struct iovec iov = { .iov_base = DATA, .iov_len = sizeof (DATA) }; + union + { + struct cmsghdr header; + char bytes[CMSG_SPACE (sizeof (int))]; + } cmsg_storage; + struct mmsghdr mmhdr = + { + .msg_hdr = + { + .msg_iov = &iov, + .msg_iovlen = 1, + .msg_control = cmsg_storage.bytes, + .msg_controllen = sizeof (cmsg_storage), + }, + }; + + /* Configure the file descriptor for sending. */ + struct cmsghdr *cmsg = CMSG_FIRSTHDR (&mmhdr.msg_hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN (sizeof (int)); + memcpy (CMSG_DATA (cmsg), &fd, sizeof (fd)); + mmhdr.msg_hdr.msg_controllen = cmsg->cmsg_len; + + /* Perform the send operation. */ + int ret; + if (use_multi_call) + { + ret = sendmmsg (sockets[1], &mmhdr, 1, 0); + if (ret >= 0) + ret = mmhdr.msg_len; + } + else + ret = sendmsg (sockets[1], &mmhdr.msg_hdr, 0); + TEST_COMPARE (ret, sizeof (DATA)); + + xclose (fd); + + /* Stop the process from exiting. */ + while (true) + pause (); +} + +/* Performs one send/receive test. */ +static void +one_test (void) +{ + TEST_COMPARE (socketpair (AF_UNIX, SOCK_STREAM, 0, sockets), 0); + + pid_t pid = xfork (); + if (pid == 0) + subprocess (); + + char data_storage[sizeof (DATA) + 1]; + struct iovec iov = + { + .iov_base = data_storage, + .iov_len = sizeof (data_storage) + }; + union + { + struct cmsghdr header; + char bytes[CMSG_SPACE (sizeof (int))]; + } cmsg_storage; + struct mmsghdr mmhdr = + { + .msg_hdr = + { + .msg_iov = &iov, + .msg_iovlen = 1, + .msg_control = cmsg_storage.bytes, + .msg_controllen = sizeof (cmsg_storage), + }, + }; + + /* Set up the space for receiving the file descriptor. */ + struct cmsghdr *cmsg = CMSG_FIRSTHDR (&mmhdr.msg_hdr); + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + cmsg->cmsg_len = CMSG_LEN (sizeof (int)); + mmhdr.msg_hdr.msg_controllen = cmsg->cmsg_len; + + /* Perform the receive operation. */ + int ret; + if (use_multi_call) + { + ret = recvmmsg (sockets[0], &mmhdr, 1, 0, NULL); + if (ret >= 0) + ret = mmhdr.msg_len; + } + else + ret = recvmsg (sockets[0], &mmhdr.msg_hdr, 0); + TEST_COMPARE (ret, sizeof (DATA)); + TEST_COMPARE_BLOB (data_storage, sizeof (DATA), DATA, sizeof (DATA)); + + /* Extract the file descriptor. */ + TEST_VERIFY (CMSG_FIRSTHDR (&mmhdr.msg_hdr) != NULL); + TEST_COMPARE (CMSG_FIRSTHDR (&mmhdr.msg_hdr)->cmsg_len, + CMSG_LEN (sizeof (int))); + TEST_VERIFY (&cmsg_storage.header == CMSG_FIRSTHDR (&mmhdr.msg_hdr)); + int fd; + memcpy (&fd, CMSG_DATA (CMSG_FIRSTHDR (&mmhdr.msg_hdr)), sizeof (fd)); + + /* Verify the received file descriptor. */ + TEST_VERIFY (fd > 2); + struct stat64 st_fd; + TEST_COMPARE (fstat64 (fd, &st_fd), 0); + struct stat64 st_path; + TEST_COMPARE (stat64 (PATH, &st_path), 0); + TEST_COMPARE (st_fd.st_ino, st_path.st_ino); + TEST_COMPARE (st_fd.st_dev, st_path.st_dev); + xclose (fd); + + /* Terminate the subprocess. */ + TEST_COMPARE (kill (pid, SIGUSR1), 0); + int status; + TEST_COMPARE (xwaitpid (pid, &status, 0), pid); + TEST_VERIFY (WIFSIGNALED (status)); + TEST_COMPARE (WTERMSIG (status), SIGUSR1); + + xclose (sockets[0]); + xclose (sockets[1]); +} + +static int +do_test (void) +{ + one_test (); + use_multi_call = true; + one_test (); + return 0; +} + +#include From patchwork Mon Jul 19 15:28:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 44399 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A11C6384A02B for ; Mon, 19 Jul 2021 15:33:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A11C6384A02B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626708826; bh=1FdSgJz5O+ruSuUbGJt15UGrszWcMspQnOHUnfqF+gE=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Gs1lzHt1W1LH8uemmQ6ia4DP6lXMIv/GWwuD5bjnRUrwbDx/WFZ7N7R67R+A0/8iq r1SlkLZZBja9s8an9TkgtUUuAKSgWX4NOTd41nNcdrYEN0NIAx4YWtDubRdc+ZNy03 jJ2RM/Kl1f7na+ST8KrjTu2k4i4/PjAWS7VPtowk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id E5BDB3954085 for ; Mon, 19 Jul 2021 15:29:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E5BDB3954085 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-275-5TGIsy9-PlmbC82LQBFaYw-1; Mon, 19 Jul 2021 11:29:00 -0400 X-MC-Unique: 5TGIsy9-PlmbC82LQBFaYw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3FABA804142 for ; Mon, 19 Jul 2021 15:28:59 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-73.phx2.redhat.com [10.3.112.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 332FD60C82 for ; Mon, 19 Jul 2021 15:28:57 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 5/8] socket: Add time64 alias for recvmsg In-Reply-To: References: X-From-Line: af51eee9f66f99070894071ce58bb6d2a179faf8 Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 19 Jul 2021 17:28:55 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- socket/sys/socket.h | 11 +++++++++++ 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 + .../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 + .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist | 1 + .../sysv/linux/powerpc/powerpc32/nofpu/libc.abilist | 1 + sysdeps/unix/sysv/linux/recvmsg.c | 3 +++ sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist | 1 + 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, 34 insertions(+) diff --git a/socket/sys/socket.h b/socket/sys/socket.h index d02d976bb5..b70ba58ba6 100644 --- a/socket/sys/socket.h +++ b/socket/sys/socket.h @@ -200,7 +200,18 @@ extern int __sendmmsg64 (int __fd, struct mmsghdr *__vmessages, This function is a cancellation point and therefore not marked with __THROW. */ +#ifndef __USE_TIME_BITS64 extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); +#else +# ifdef __REDIRECT +extern ssize_t __REDIRECT (recvmsg, + (int __fd, struct msghdr *__message, int __flags), + __recvmsg64); +# else +extern ssize_t __recvmsg64 (int __fd, struct msghdr *__message, int __flags); +# define recvmsg __recvmsg64 +# endif +#endif #ifdef __USE_GNU /* Receive up to VLEN messages as described by VMESSAGES from socket FD. diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index a8ec041371..8cc7d6ea15 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -259,6 +259,7 @@ libc { __pthread_rwlock_timedwrlock64; __pthread_timedjoin_np64; __recvmmsg64; + __recvmsg64; __sched_rr_get_interval64; __select64; __sem_clockwait64; diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index 740081f235..5966d4b869 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -260,6 +260,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index 55f17e1ee3..0ba0a7f031 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -257,6 +257,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index 610f59aad7..59b6af995f 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2416,6 +2416,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index 3c6ce135e2..cf9f0372d0 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2367,6 +2367,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index 2fae97c00c..e1b9ad8229 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2551,6 +2551,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index c146c01b62..6c6e132c12 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -261,6 +261,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index dc23970913..4a5a31a54b 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2494,6 +2494,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index 63b86f4613..638ee4d1d8 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2467,6 +2467,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index 4f2811c869..d6b6c85f74 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2464,6 +2464,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index b3491fd1db..8bab590546 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2459,6 +2459,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index 7d56039df5..33cc242f26 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2457,6 +2457,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index 0898b26a90..b8d2cceade 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2465,6 +2465,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index 19b42df933..f99820e4ff 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2506,6 +2506,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 09179d2a48..1e7837c971 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2521,6 +2521,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index d45be8ab9e..de62b347b0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2554,6 +2554,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/recvmsg.c b/sysdeps/unix/sysv/linux/recvmsg.c index 57c3cf7e36..07212f7c86 100644 --- a/sysdeps/unix/sysv/linux/recvmsg.c +++ b/sysdeps/unix/sysv/linux/recvmsg.c @@ -43,3 +43,6 @@ __libc_recvmsg (int fd, struct msghdr *msg, int flags) } weak_alias (__libc_recvmsg, recvmsg) weak_alias (__libc_recvmsg, __recvmsg) +#if __TIMESIZE != 64 +weak_alias (__recvmsg, __recvmsg64) +#endif diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index c290ae4948..2f4b06e27c 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2519,6 +2519,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index 714f7d4f55..c01917dca8 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2374,6 +2374,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index 9f858a4f68..d0449dc285 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2371,6 +2371,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index 2420775e21..309ce62d75 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2514,6 +2514,7 @@ GLIBC_2.34 __pthread_unregister_cancel F GLIBC_2.34 __pthread_unregister_cancel_restore F GLIBC_2.34 __pthread_unwind_next F GLIBC_2.34 __recvmmsg64 F +GLIBC_2.34 __recvmsg64 F GLIBC_2.34 __sched_rr_get_interval64 F GLIBC_2.34 __select64 F GLIBC_2.34 __sem_clockwait64 F From patchwork Mon Jul 19 15:29:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 44400 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6628C395543B for ; Mon, 19 Jul 2021 15:34:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6628C395543B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626708871; bh=j5jnXg5HvEexkPVi0RXm37Tp/iJJRKLbzYrGNZJR4oQ=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=cB/DfqBkXhRMB1TMUH5WjBxxyRZfxXp3Fcz4Nhp0z+E1fEypvIaxfhSi7btSV3VUE Yug3qUoCMgqk6pdvv2x5ou8frcixnHM7rq9E5hBR2Am8JI714PfGZowlflshRX3weP eipSETm1OnpbxhR7Rgp1VgN8Ld75JvIYzq56eg7s= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 531D039551F8 for ; Mon, 19 Jul 2021 15:29:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 531D039551F8 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-162-hBzXzJFwP2CaktJAoPZjEA-1; Mon, 19 Jul 2021 11:29:04 -0400 X-MC-Unique: hBzXzJFwP2CaktJAoPZjEA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EC1B318358EF for ; Mon, 19 Jul 2021 15:29:03 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-73.phx2.redhat.com [10.3.112.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E01975D9DC for ; Mon, 19 Jul 2021 15:29:02 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 6/8] socket: Add time64 alias for sendmsg In-Reply-To: References: X-From-Line: bd055d3220c7ccb8513cd469d00bb287cbde0a63 Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 19 Jul 2021 17:29:00 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- socket/sys/socket.h | 12 ++++++++++++ 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 + .../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 + .../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/sendmsg.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, 35 insertions(+) diff --git a/socket/sys/socket.h b/socket/sys/socket.h index b70ba58ba6..e779dc837f 100644 --- a/socket/sys/socket.h +++ b/socket/sys/socket.h @@ -170,8 +170,20 @@ extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, This function is a cancellation point and therefore not marked with __THROW. */ +#ifndef __USE_TIME_BITS64 extern ssize_t sendmsg (int __fd, const struct msghdr *__message, int __flags); +#else +# ifdef __REDIRECT +extern ssize_t __REDIRECT (sendmsg, (int __fd, const struct msghdr *__message, + int __flags), + __sendmsg64); +# else +extern ssize_t __sendmsg64 (int __fd, const struct msghdr *__message, + int __flags); +# defien sendmsg __sendmsg64 +# endif +#endif #ifdef __USE_GNU /* Send a VLEN messages as described by VMESSAGES to socket FD. diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index 8cc7d6ea15..e03ebf9aff 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -267,6 +267,7 @@ libc { __semtimedop64; __sem_timedwait64; __sendmmsg64; + __sendmsg64; __setitimer64; __settimeofday64; __shmctl64; diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index 5966d4b869..c3c96f24c4 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -268,6 +268,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index 0ba0a7f031..2786afa406 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -265,6 +265,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index 59b6af995f..da3f538b40 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2424,6 +2424,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index cf9f0372d0..47d376ff62 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2375,6 +2375,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index e1b9ad8229..d6b038b6a3 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2559,6 +2559,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index 6c6e132c12..ab9e0955dd 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -269,6 +269,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index 4a5a31a54b..479d17be35 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2502,6 +2502,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index 638ee4d1d8..90302842f5 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2475,6 +2475,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index d6b6c85f74..dcfd52ec31 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2472,6 +2472,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index 8bab590546..c72c2a7101 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2467,6 +2467,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index 33cc242f26..6725735b59 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2465,6 +2465,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index b8d2cceade..5c2e228628 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2473,6 +2473,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index f99820e4ff..e0ffbb5687 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2514,6 +2514,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 1e7837c971..105dda5300 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2529,6 +2529,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index de62b347b0..b079847f84 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2562,6 +2562,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index 2f4b06e27c..b3b55c9c68 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2527,6 +2527,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/sendmsg.c b/sysdeps/unix/sysv/linux/sendmsg.c index d1d1946280..eb99325a0e 100644 --- a/sysdeps/unix/sysv/linux/sendmsg.c +++ b/sysdeps/unix/sysv/linux/sendmsg.c @@ -32,3 +32,6 @@ __libc_sendmsg (int fd, const struct msghdr *msg, int flags) } weak_alias (__libc_sendmsg, sendmsg) weak_alias (__libc_sendmsg, __sendmsg) +#if __TIMESIZE != 64 +weak_alias (__sendmsg, __sendmsg64) +#endif diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index c01917dca8..54174a2263 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2382,6 +2382,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index d0449dc285..3028f6c334 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2379,6 +2379,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index 309ce62d75..8b0ae536e2 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2522,6 +2522,7 @@ GLIBC_2.34 __sem_timedwait64 F GLIBC_2.34 __semctl64 F GLIBC_2.34 __semtimedop64 F GLIBC_2.34 __sendmmsg64 F +GLIBC_2.34 __sendmsg64 F GLIBC_2.34 __setitimer64 F GLIBC_2.34 __settimeofday64 F GLIBC_2.34 __shmctl64 F From patchwork Mon Jul 19 15:29:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 44401 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EC75E395560A for ; Mon, 19 Jul 2021 15:35:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC75E395560A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626708922; bh=jbZUHJlM44LyIcHtjIxlGDhoqFeCEfcZRZon8y+yZ+A=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=bTwP0aCBFy0RKNScCnoF/dAVtpIzgE1UCWn7LzyttNzRavtGNJzzJPTZHvN+EBho5 e7inAJwydZdBhcJZKtr/Q8OfvEgQraVcgNHQIpNkrGq5Vj+h1Rzup+ADM1cYQEo0A3 CdkGTrt7Gd+9OePZY2aTnTobZTKJIyIoc9/s2J9k= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 262713953C37 for ; Mon, 19 Jul 2021 15:29:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 262713953C37 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-364-DmlSHfK1PUmxU2AlPUS5PA-1; Mon, 19 Jul 2021 11:29:17 -0400 X-MC-Unique: DmlSHfK1PUmxU2AlPUS5PA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5843D1835AC4 for ; Mon, 19 Jul 2021 15:29:16 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-73.phx2.redhat.com [10.3.112.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B4605D9DC for ; Mon, 19 Jul 2021 15:29:15 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 7/8] socket: Add time64 alias for getsockopt In-Reply-To: References: X-From-Line: a15532a91cbfa51ecfa6b35a5d2f0083f78dbc79 Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 19 Jul 2021 17:29:13 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- socket/Makefile | 9 +++- socket/sys/socket.h | 15 ++++++ socket/tst-sockopt-time64.c | 1 + socket/tst-sockopt.c | 52 +++++++++++++++++++ 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/getsockopt.c | 3 ++ sysdeps/unix/sysv/linux/hppa/libc.abilist | 1 + sysdeps/unix/sysv/linux/i386/libc.abilist | 1 + .../sysv/linux/m68k/coldfire/libc.abilist | 1 + .../unix/sysv/linux/m68k/m680x0/libc.abilist | 1 + .../sysv/linux/microblaze/be/libc.abilist | 1 + .../sysv/linux/microblaze/le/libc.abilist | 1 + .../sysv/linux/mips/mips32/fpu/libc.abilist | 1 + .../sysv/linux/mips/mips32/nofpu/libc.abilist | 1 + .../sysv/linux/mips/mips64/n32/libc.abilist | 1 + sysdeps/unix/sysv/linux/nios2/libc.abilist | 1 + .../linux/powerpc/powerpc32/fpu/libc.abilist | 1 + .../powerpc/powerpc32/nofpu/libc.abilist | 1 + .../unix/sysv/linux/s390/s390-32/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/be/libc.abilist | 1 + sysdeps/unix/sysv/linux/sh/le/libc.abilist | 1 + .../sysv/linux/sparc/sparc32/libc.abilist | 1 + 25 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 socket/tst-sockopt-time64.c create mode 100644 socket/tst-sockopt.c Reviewed-by: Adhemerval Zanella diff --git a/socket/Makefile b/socket/Makefile index 27ffe44c05..3759576010 100644 --- a/socket/Makefile +++ b/socket/Makefile @@ -31,7 +31,14 @@ routines := accept bind connect getpeername getsockname getsockopt \ setsockopt shutdown socket socketpair isfdtype opensock \ sockatmark accept4 recvmmsg sendmmsg -tests := tst-accept4 +tests := \ + tst-accept4 \ + tst-sockopt \ + # tests + +tests-time64 := \ + tst-sockopt-time64 \ + # tests aux := sa_len diff --git a/socket/sys/socket.h b/socket/sys/socket.h index e779dc837f..b37c87e7df 100644 --- a/socket/sys/socket.h +++ b/socket/sys/socket.h @@ -251,9 +251,24 @@ extern int __REDIRECT (recvmmsg, (int __fd, struct mmsghdr *__vmessages, /* 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 actual length. Returns 0 on success, -1 for errors. */ +#ifndef __USE_TIME_BITS64 extern int getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen) __THROW; +#else +# ifdef __REDIRECT +extern int __REDIRECT_NTH (getsockopt, + (int __fd, int __level, int __optname, + void *__restrict __optval, + socklen_t *__restrict __optlen), + __getsockopt64); +# else +extern int __getsockopt64 (int __fd, int __level, int __optname, + void *__restrict __optval, + socklen_t *__restrict __optlen) __THROW; +# define getsockopt __getsockopt64 +# endif +#endif /* Set socket FD's option OPTNAME at protocol level LEVEL to *OPTVAL (which is OPTLEN bytes long). diff --git a/socket/tst-sockopt-time64.c b/socket/tst-sockopt-time64.c new file mode 100644 index 0000000000..f1df48de73 --- /dev/null +++ b/socket/tst-sockopt-time64.c @@ -0,0 +1 @@ +#include "tst-sockopt.c" diff --git a/socket/tst-sockopt.c b/socket/tst-sockopt.c new file mode 100644 index 0000000000..f3ce0bc3a4 --- /dev/null +++ b/socket/tst-sockopt.c @@ -0,0 +1,52 @@ +/* Smoke test for socket options. + Copyright (C) 2021 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include +#include + +static int +do_test (void) +{ + int fd = xsocket (AF_INET, SOCK_STREAM, IPPROTO_TCP); + + struct linger value = { -1, -1 }; + socklen_t optlen = sizeof (value); + TEST_COMPARE (getsockopt (fd, SOL_SOCKET, SO_LINGER, &value, &optlen), 0); + TEST_COMPARE (optlen, sizeof (value)); + TEST_COMPARE (value.l_onoff, 0); + TEST_COMPARE (value.l_linger, 0); + + value.l_onoff = 1; + value.l_linger = 30; + TEST_COMPARE (setsockopt (fd, SOL_SOCKET, SO_LINGER, &value, sizeof (value)), + 0); + + value.l_onoff = -1; + value.l_linger = -1; + TEST_COMPARE (getsockopt (fd, SOL_SOCKET, SO_LINGER, &value, &optlen), 0); + TEST_COMPARE (optlen, sizeof (value)); + TEST_COMPARE (value.l_onoff, 1); + TEST_COMPARE (value.l_linger, 30); + + xclose (fd); + return 0; +} + +#include diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index e03ebf9aff..5ff450f476 100644 --- a/sysdeps/unix/sysv/linux/Versions +++ b/sysdeps/unix/sysv/linux/Versions @@ -225,6 +225,7 @@ libc { __gai_suspend_time64; __getitimer64; __getrusage64; + __getsockopt64; __gettimeofday64; __glob64_time64; __globfree64_time64; diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index c3c96f24c4..cb5615f428 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -218,6 +218,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist index 2786afa406..88c3db4560 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -215,6 +215,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index da3f538b40..e90ad23a66 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2374,6 +2374,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/getsockopt.c b/sysdeps/unix/sysv/linux/getsockopt.c index f86b06dec6..57343d432c 100644 --- a/sysdeps/unix/sysv/linux/getsockopt.c +++ b/sysdeps/unix/sysv/linux/getsockopt.c @@ -101,3 +101,6 @@ __getsockopt (int fd, int level, int optname, void *optval, socklen_t *len) return r; } weak_alias (__getsockopt, getsockopt) +#if __TIMESIZE != 64 +weak_alias (__getsockopt, __getsockopt64) +#endif diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index 47d376ff62..ea727e1956 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2325,6 +2325,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index d6b038b6a3..f53a44f7ca 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2508,6 +2508,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist index ab9e0955dd..c86910563a 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -219,6 +219,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist index 479d17be35..c7fe3b31e7 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2452,6 +2452,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist index 90302842f5..3c8ed8d962 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2425,6 +2425,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist index dcfd52ec31..cc3a28054d 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2422,6 +2422,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist index c72c2a7101..49bc91ab6a 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2417,6 +2417,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist index 6725735b59..853a61f3db 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2415,6 +2415,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist index 5c2e228628..28917895bd 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2423,6 +2423,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index e0ffbb5687..e4d4ea4d26 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2464,6 +2464,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 105dda5300..22b7f8604d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2479,6 +2479,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index b079847f84..8b49bcfe32 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2512,6 +2512,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist index b3b55c9c68..97939a88ee 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2477,6 +2477,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist index 54174a2263..a56b7ddd00 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2332,6 +2332,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist index 3028f6c334..c043e9b58f 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2329,6 +2329,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist index 8b0ae536e2..ebd2acd9e4 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2472,6 +2472,7 @@ GLIBC_2.34 __futimesat64 F GLIBC_2.34 __gai_suspend_time64 F GLIBC_2.34 __getitimer64 F GLIBC_2.34 __getrusage64 F +GLIBC_2.34 __getsockopt64 F GLIBC_2.34 __gettimeofday64 F GLIBC_2.34 __glob64_time64 F GLIBC_2.34 __globfree64_time64 F From patchwork Mon Jul 19 15:29:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 44402 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9CB483959CBE for ; Mon, 19 Jul 2021 15:36:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CB483959CBE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626708966; bh=NCmCrUf/LdE8j4X41/yhGYNKKuuXOWS9hIHxcogBjIg=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=L9aya3mIzCOs3Q3ZDuFkksxHzFw3PPFgjwOOvxAqgyL7pXhiaaU7p03+Al4XEdcKX 1esE9C1tj4NnnTL2wc7BwN5H07z4aCsJpSzdgh21D8CVgy2WBGGCITEa3SeDWxZW7B djxj6RNGxiHcgoE2LmvPfDSerciUQbvTd0rf3/sA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id E785F3954404 for ; Mon, 19 Jul 2021 15:29:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E785F3954404 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-407-L7R_q9KZNA2FBqryVd21dQ-1; Mon, 19 Jul 2021 11:29:23 -0400 X-MC-Unique: L7R_q9KZNA2FBqryVd21dQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 396FB80365C for ; Mon, 19 Jul 2021 15:29:22 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-73.phx2.redhat.com [10.3.112.73]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 238E310023B5 for ; Mon, 19 Jul 2021 15:29:20 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 8/8] socket: Add time64 alias for setsockopt In-Reply-To: References: X-From-Line: f1497c80f495f31be394d7471134071922870701 Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 19 Jul 2021 17:29:18 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Libc-alpha From: Florian Weimer Reply-To: Florian Weimer Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" --- 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(-) Reviewed-by: Adhemerval Zanella 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