From patchwork Mon Jul 5 13:41:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1500768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=TG/IutQC; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GJRh8604wz9sV8 for ; Mon, 5 Jul 2021 23:42:32 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33AA4384002B for ; Mon, 5 Jul 2021 13:42:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33AA4384002B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625492550; bh=hwyszCJCB6ezCWiVOyMvMTlXhNOXRDTfjUHx6YobBxs=; 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=TG/IutQCXJ/CSt/yfu907/NYlhcECVAJ4hCn2N9961BlNdneJy+CQ+41BcLS5+ayD o+AtJXBrwmCyoOorFv9feNN32tVpLuB1DVLPDl9cXB+bCXnJjWvV+Ckurb6asGCLoW 11X08ONSbahiN6auGEXG1A+JxaXs8cLvKGMhSkPI= 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 116713840003 for ; Mon, 5 Jul 2021 13:41:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 116713840003 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-325-HL4RmErzO5Go3MbUR5Wiyw-1; Mon, 05 Jul 2021 09:41:39 -0400 X-MC-Unique: HL4RmErzO5Go3MbUR5Wiyw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F1411800D41 for ; Mon, 5 Jul 2021 13:41:38 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 79A491346F for ; Mon, 5 Jul 2021 13:41:37 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 1/8] misc: Add time64 alias for ioctl In-Reply-To: References: X-From-Line: d26c7694ed8e8a28ccbbe67716afea25cdcb1a01 Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 05 Jul 2021 15:41:35 +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.11 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+incoming=patchwork.ozlabs.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 Reviewed-by: Lukasz Majewski Reviewed-by: Adhemerval Zanella 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 53cb7b23e2..c12ee647ae 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 9b824f1605..85d572ba84 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 443a81b8f7..79be7bcce3 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 243de3cf93..1aad4a1be0 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2354,6 +2354,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 24ae58bb6f..59f61b4b48 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2307,6 +2307,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 09bebcd5a1..0acf01c432 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2490,6 +2490,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 c1fcde4c24..a030d33f83 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 407651cfd7..9ba724cff0 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2434,6 +2434,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 7da722a734..31a33e2d05 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2405,6 +2405,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 c374607b81..4faaa64714 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2402,6 +2402,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 b1f426e053..b283bb5a3d 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2399,6 +2399,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 066ceb2258..6145a5c1a3 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2397,6 +2397,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 51c563ebbe..ebbfdc0fe4 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2405,6 +2405,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 ab9f2bd42c..e7cb508d19 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2444,6 +2444,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 83f8513e17..7742c0f9f7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2461,6 +2461,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 0fad357bf6..d0786c84a9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2494,6 +2494,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 12aeb82520..fd09d6a21b 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2459,6 +2459,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 1ce4b54bf2..48f13e2b53 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2314,6 +2314,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 7d01add713..e1ff04148b 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2311,6 +2311,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 b5ef3247d7..2100ecc3f9 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2454,6 +2454,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 5 13:41:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1500771 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=xFoSjroJ; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GJRj763fJz9sXM for ; Mon, 5 Jul 2021 23:43:23 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C4F7B383F438 for ; Mon, 5 Jul 2021 13:43:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C4F7B383F438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625492600; bh=5D1bHc25V8YLFHC7DsoYpv5FiBXEHu3ad1NnIuTqhMU=; 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=xFoSjroJf6wp0SDTtFAzr02O0EkJMwOKlms3gG6XwFPAS/cy/YGYcXErv3U032Oh4 yVWeAkw3m6M5IrqS1LUnX5REn8aoAo0rf4OtAABBQ+kA9txn6vdyr8xwmrWSAvlsAN InJmJkhe57O25yBIFUoLJCnM1GKHR/9P0JzT1kS0= 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 AA1793840022 for ; Mon, 5 Jul 2021 13:41:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AA1793840022 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-97-xj4h_iM4N16PmoKmQu_YGg-1; Mon, 05 Jul 2021 09:41:49 -0400 X-MC-Unique: xj4h_iM4N16PmoKmQu_YGg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 12EE0804140 for ; Mon, 5 Jul 2021 13:41:48 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 05AF460864 for ; Mon, 5 Jul 2021 13:41:46 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 2/8] io: Add time64 alias for fcntl In-Reply-To: References: X-From-Line: f18c52d25ea0879d42c05a1a641837b0a47a00f0 Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 05 Jul 2021 15:41:44 +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.13 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+incoming=patchwork.ozlabs.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 Reviewed-by: Adhemerval Zanella diff --git a/io/Makefile b/io/Makefile index 1a16990205..6120ee0cd7 100644 --- a/io/Makefile +++ b/io/Makefile @@ -88,6 +88,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 85d572ba84..1243e62e45 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 79be7bcce3..4750d5db49 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 1aad4a1be0..6e3263d2fd 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2335,6 +2335,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 59f61b4b48..d21cefe909 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2288,6 +2288,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 0acf01c432..f10f233bf6 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2471,6 +2471,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 a030d33f83..577f5f171d 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 9ba724cff0..af68a21c02 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2415,6 +2415,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 31a33e2d05..c875c87f93 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2386,6 +2386,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 4faaa64714..23835351e3 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2383,6 +2383,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 b283bb5a3d..08a16d9140 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2380,6 +2380,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 6145a5c1a3..88a739586c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2378,6 +2378,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 ebbfdc0fe4..a7f8058932 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2386,6 +2386,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 e7cb508d19..00242d3e83 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2425,6 +2425,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 7742c0f9f7..2589b685d6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2442,6 +2442,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 d0786c84a9..e4b172a6e0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2475,6 +2475,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 fd09d6a21b..be2908b27a 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2440,6 +2440,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 48f13e2b53..4797150a1c 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2295,6 +2295,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 e1ff04148b..4d38657618 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2292,6 +2292,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 2100ecc3f9..fe026eb19e 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2435,6 +2435,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 5 13:42:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1500772 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=dGqOi1gK; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GJRk00yP0z9sX1 for ; Mon, 5 Jul 2021 23:44:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8288B385C40F for ; Mon, 5 Jul 2021 13:44:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8288B385C40F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625492645; bh=oH6qnMo6S5hsB+TuVYdUGiXztdk5Hu+UxJAsZh4oEg8=; 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=dGqOi1gKNo7Kqwd/3mpIs7I/jw8BhSVhJess8OY4ebQhKbSVCVQ6tABi0lbamkzNh e/HYQH+k4s5+uzmXsFhq75Q6aPim9IrovTdzKhGW3DmZtEo6oIHxmdrf7UK4fX0ge2 8P7zGuB664aPBiQFlZAXlhBW5THpSHmSnzZabPCs= 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 6484C384002D for ; Mon, 5 Jul 2021 13:42:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6484C384002D 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-585-1ptIQX_MPKGSL7DeY10xcA-1; Mon, 05 Jul 2021 09:42:06 -0400 X-MC-Unique: 1ptIQX_MPKGSL7DeY10xcA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C13A5804142 for ; Mon, 5 Jul 2021 13:42:05 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B3BE719CB4 for ; Mon, 5 Jul 2021 13:42:04 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 3/8] Linux: Add time64 alias for prctl In-Reply-To: References: X-From-Line: 460a87e66eeae056c36a54206580d995f64c0caf Mon Sep 17 00:00:00 2001 Message-Id: <460a87e66eeae056c36a54206580d995f64c0caf.1625492203.git.fweimer@redhat.com> Date: Mon, 05 Jul 2021 15:42:02 +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.11 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+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" --- sysdeps/unix/sysv/linux/Makefile | 4 ++- 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, 70 insertions(+), 1 deletion(-) create mode 100644 sysdeps/unix/sysv/linux/tst-prctl-time64.c create mode 100644 sysdeps/unix/sysv/linux/tst-prctl.c Reviewed-by: Lukasz Majewski Reviewed-by: Adhemerval Zanella diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index faea02bd1b..6fe358cecc 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -116,7 +116,7 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ tst-tgkill tst-sysvsem-linux tst-sysvmsg-linux tst-sysvshm-linux \ tst-timerfd tst-ppoll \ tst-clock_adjtime tst-adjtimex tst-ntp_adjtime tst-ntp_gettime \ - tst-ntp_gettimex tst-sigtimedwait tst-misalign-clone + tst-ntp_gettimex tst-sigtimedwait tst-misalign-clone tst-prctl # Test for the symbol version of fcntl that was replaced in glibc 2.28. ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes) @@ -134,6 +134,8 @@ tests-time64 += \ tst-ppoll-time64 \ tst-sigtimedwait-time64 \ tst-timerfd-time64 \ + tst-prctl-time64 \ + # tests-time64 CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index c12ee647ae..97e1e81801 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 1243e62e45..06deef986f 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 4750d5db49..cb5a95ebb9 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 6e3263d2fd..76a1898218 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2372,6 +2372,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 d21cefe909..cb135fe6ca 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2325,6 +2325,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 f10f233bf6..8941056337 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2509,6 +2509,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 577f5f171d..7cec07ea16 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 af68a21c02..edc488fe98 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 __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 c875c87f93..b382d9b268 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2423,6 +2423,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 23835351e3..75752d1400 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2420,6 +2420,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 08a16d9140..e362490afb 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 __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 88a739586c..d2eba312a7 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 __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 a7f8058932..ec5d956d0c 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 __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 00242d3e83..5ffbab4d4c 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2462,6 +2462,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 2589b685d6..d4ba30a441 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 __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 e4b172a6e0..8eb206d36e 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 __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 be2908b27a..a3c80bc9ba 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 __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 4797150a1c..6692749dac 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 __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 4d38657618..2207e3811c 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 __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 fe026eb19e..16099127e5 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 __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 5 13:42:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1500773 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=GnptC9UN; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GJRky1zSPz9sXM for ; Mon, 5 Jul 2021 23:44:58 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BA6EA383F40A for ; Mon, 5 Jul 2021 13:44:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA6EA383F40A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625492695; bh=BEoSudu7IWihvysEJjVwFjaUnKHbKdUPk0EJj+Gq1Z8=; 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=GnptC9UNmf9aFLWzYEBet6AuZETmUQzNia6acgPuh7z5r5+az4pREIa0uOcZ+M4Lp HIEUTae3ptVxRDoWr7ds/aBrYr8CduGyqsqQ7jMKpnzKc04cHzWOKbnA2G6PJM5HBK bZqK8MR5uGN6zpsqh+vZsnNwEoeKp+/7D+SQnQOc= 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 C692F3870866 for ; Mon, 5 Jul 2021 13:42:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C692F3870866 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-36-6RD_k27pP3CMkkMrOs6qBQ-1; Mon, 05 Jul 2021 09:42:12 -0400 X-MC-Unique: 6RD_k27pP3CMkkMrOs6qBQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6767B100CF72 for ; Mon, 5 Jul 2021 13:42:11 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B48060864 for ; Mon, 5 Jul 2021 13:42:10 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 4/8] socket: Add time64 alias for sendmmsg In-Reply-To: References: X-From-Line: 2da65ac5bceca941853ff51af8f8e677bcf96546 Mon Sep 17 00:00:00 2001 Message-Id: <2da65ac5bceca941853ff51af8f8e677bcf96546.1625492203.git.fweimer@redhat.com> Date: Mon, 05 Jul 2021 15:42:08 +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.13 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+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" --- socket/sys/socket.h | 14 +- sysdeps/unix/sysv/linux/Makefile | 4 +- 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, 226 insertions(+), 2 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/tst-scm_rights-time64.c create mode 100644 sysdeps/unix/sysv/linux/tst-scm_rights.c Reviewed-by: Lukasz Majewski Reviewed-by: Adhemerval Zanella 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 6fe358cecc..cd13ab4e6a 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -116,7 +116,8 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \ tst-tgkill tst-sysvsem-linux tst-sysvmsg-linux tst-sysvshm-linux \ tst-timerfd tst-ppoll \ tst-clock_adjtime tst-adjtimex tst-ntp_adjtime tst-ntp_gettime \ - tst-ntp_gettimex tst-sigtimedwait tst-misalign-clone tst-prctl + tst-ntp_gettimex tst-sigtimedwait tst-misalign-clone tst-prctl \ + tst-scm_rights # Test for the symbol version of fcntl that was replaced in glibc 2.28. ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes) @@ -135,6 +136,7 @@ tests-time64 += \ tst-sigtimedwait-time64 \ tst-timerfd-time64 \ tst-prctl-time64 \ + tst-scm_rights-time64 \ # tests-time64 CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions index 97e1e81801..0fc5d59608 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 06deef986f..6654462ff2 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_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 cb5a95ebb9..e4f66ebad8 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_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 76a1898218..b145b90667 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2400,6 +2400,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 cb135fe6ca..2fcd2408ee 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2353,6 +2353,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 8941056337..9876c4fccc 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2537,6 +2537,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 7cec07ea16..1db5f6ac97 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_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 edc488fe98..9ff084727a 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2480,6 +2480,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 b382d9b268..9bf0dc86d3 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2451,6 +2451,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 75752d1400..6eca8d3e65 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2448,6 +2448,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 e362490afb..3e10357c37 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2445,6 +2445,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 d2eba312a7..40def98ca7 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2443,6 +2443,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 ec5d956d0c..21decc1ba4 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2451,6 +2451,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 5ffbab4d4c..c4a1d8f8dd 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2490,6 +2490,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 d4ba30a441..3afedd33c3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2507,6 +2507,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 8eb206d36e..3d0366c7d5 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2540,6 +2540,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 a3c80bc9ba..1323f731dd 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2505,6 +2505,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 6692749dac..af375af8d1 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2360,6 +2360,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 2207e3811c..e151761455 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2357,6 +2357,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 16099127e5..ca186834b4 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/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/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 5 13:42: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: 1500774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=LlEbgDN8; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GJRlq1HtLz9sX1 for ; Mon, 5 Jul 2021 23:45:43 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A7FAA3858031 for ; Mon, 5 Jul 2021 13:45:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7FAA3858031 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625492740; bh=NCWyMHpTluecvpShmKMaHY1RI3LIyGq/zYvxiC8Txac=; 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=LlEbgDN8yk2FwFMVTAyXlq/4ePEVnZnh02SsJyRJXoK3O4cP4mXpXmzdqWSB9YpVY U1id6v7qSBgCRfQ6Rc3L53ac0Bo3AiFvvHr1iJAna6EmCo7PT58CVDJuedRfMja54k JsUealBPxnfTDdevi8GczwS4gPC8HgeFXZ55t2RA= 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 A84A03840007 for ; Mon, 5 Jul 2021 13:42:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A84A03840007 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-125-niuZfHtqPaeuEoobJJ_PJg-1; Mon, 05 Jul 2021 09:42:17 -0400 X-MC-Unique: niuZfHtqPaeuEoobJJ_PJg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 518FBA40CB for ; Mon, 5 Jul 2021 13:42:16 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 45F8C60864 for ; Mon, 5 Jul 2021 13:42:15 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 5/8] socket: Add time64 alias for recvmsg In-Reply-To: References: X-From-Line: 35f6e2d818166c6d5fd060870bc690f48af93a61 Mon Sep 17 00:00:00 2001 Message-Id: <35f6e2d818166c6d5fd060870bc690f48af93a61.1625492203.git.fweimer@redhat.com> Date: Mon, 05 Jul 2021 15:42: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.13 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+incoming=patchwork.ozlabs.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(+) Reviewed-by: Lukasz Majewski Reviewed-by: Adhemerval Zanella 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 0fc5d59608..cb6fdd0624 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 6654462ff2..8a31fb4daf 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -262,6 +262,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 e4f66ebad8..19e1339ad6 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -259,6 +259,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 b145b90667..0b3c41a4a7 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2394,6 +2394,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 2fcd2408ee..cc7a5fd871 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2347,6 +2347,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 9876c4fccc..ab12ec459c 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2531,6 +2531,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 1db5f6ac97..149503b582 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -263,6 +263,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 9ff084727a..3080c5905a 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 __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 9bf0dc86d3..c4f3779806 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2445,6 +2445,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 6eca8d3e65..676a26dd32 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2442,6 +2442,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 3e10357c37..007b0f181a 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 __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 40def98ca7..aa7da8a7dd 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 __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 21decc1ba4..73e3f01a22 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 __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 c4a1d8f8dd..66fc50179c 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2484,6 +2484,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 3afedd33c3..3a0754ca08 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 __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 3d0366c7d5..f2a4bc6fb1 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 __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 a2a600228b..5d5fa3d851 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 1323f731dd..9f7da52f44 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 __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 af375af8d1..8e9fb98464 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 __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 e151761455..61b023f584 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 __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 ca186834b4..ba3c659c88 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 __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 5 13:42:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1500775 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=WqctxuPG; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GJRmn4JK3z9sXM for ; Mon, 5 Jul 2021 23:46:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 026FF383F404 for ; Mon, 5 Jul 2021 13:46:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 026FF383F404 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625492791; bh=iatzcKBZSSugCevaN1p7TAuRUvAcaA4F7qiJg9mGc6Q=; 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=WqctxuPGoWTDXJQhL5iCgFksnV2gTf221kXa90j91fJK/MBthI/EKEBUP8sbNH5D9 1BlY17ICN6uthfZ4b9e+pp4lBfVEEh5JwvHgY2F2ElFS6xb5EbFMlFA4t1sna92fcG 2xFxw/5nIzLQfSZ9UUrpnQ6Wzcm0IlAsAo3I0pcE= 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 15903386FC3A for ; Mon, 5 Jul 2021 13:42:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 15903386FC3A 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-98-f-sMTyXGPze9SXfqzhag-A-1; Mon, 05 Jul 2021 09:42:21 -0400 X-MC-Unique: f-sMTyXGPze9SXfqzhag-A-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 D0786100CCC0 for ; Mon, 5 Jul 2021 13:42:20 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C25731002D71 for ; Mon, 5 Jul 2021 13:42:19 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 6/8] socket: Add time64 alias for sendmsg In-Reply-To: References: X-From-Line: c43dadeb77d7ebe020991128ebc50445de10f183 Mon Sep 17 00:00:00 2001 Message-Id: Date: Mon, 05 Jul 2021 15:42:17 +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+incoming=patchwork.ozlabs.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(+) Reviewed-by: Lukasz Majewski Reviewed-by: Adhemerval Zanella 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 cb6fdd0624..f9fcc60335 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 8a31fb4daf..7d3c82b6d1 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -270,6 +270,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 19e1339ad6..758d4bedd4 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -267,6 +267,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 0b3c41a4a7..663db34dbd 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2402,6 +2402,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 cc7a5fd871..37edc65bad 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2355,6 +2355,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 ab12ec459c..e667c6f166 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2539,6 +2539,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 149503b582..92db44126d 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -271,6 +271,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 3080c5905a..8b8decd376 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2482,6 +2482,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 c4f3779806..51580fe799 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2453,6 +2453,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 676a26dd32..4ff4402991 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2450,6 +2450,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 007b0f181a..ab4d0386d4 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2447,6 +2447,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 aa7da8a7dd..b31edbbd77 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2445,6 +2445,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 73e3f01a22..dc49ba11e3 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2453,6 +2453,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 66fc50179c..e359e90654 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2492,6 +2492,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 3a0754ca08..fbbe434125 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2509,6 +2509,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 f2a4bc6fb1..476283b260 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2542,6 +2542,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 9f7da52f44..97d486a10b 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2507,6 +2507,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 8e9fb98464..788ff9bc68 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2362,6 +2362,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 61b023f584..8a23b8eb52 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2359,6 +2359,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 ba3c659c88..177f3e1e83 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/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 From patchwork Mon Jul 5 13:42:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1500776 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=de+LM8pa; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GJRnf5xMSz9sX1 for ; Mon, 5 Jul 2021 23:47:18 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A7DC0383F438 for ; Mon, 5 Jul 2021 13:47:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A7DC0383F438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625492835; bh=M7sh9SFYZuHABWWDxYYZYHY22IxFC30WvojCgavr/rQ=; 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=de+LM8paWtCzXTirS0tGwcA7rKPQZCqquXC+3ZobSu0PP3OCyg58Noq67c+1v4KhS 80LtdKOEtd+bxb5HAJMsja5s8Nulvi/UgdjvpehujDrrW7E8tvzPqn3LPwmqbzDZw8 GGX9nVzZULCN/gR1B1FKiz9IZ9rUdRpUKq6QGNqI= 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 4CA153840C20 for ; Mon, 5 Jul 2021 13:42:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4CA153840C20 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-279-8zsDnGn7MveyDHRRtTqDjw-1; Mon, 05 Jul 2021 09:42:26 -0400 X-MC-Unique: 8zsDnGn7MveyDHRRtTqDjw-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 BA591100CF71 for ; Mon, 5 Jul 2021 13:42:25 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AEA611002D71 for ; Mon, 5 Jul 2021 13:42:24 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 7/8] socket: Add time64 alias for getsockopt In-Reply-To: References: X-From-Line: 539b2c5d20735487ae6c1276f42679dc4ff38ae0 Mon Sep 17 00:00:00 2001 Message-Id: <539b2c5d20735487ae6c1276f42679dc4ff38ae0.1625492203.git.fweimer@redhat.com> Date: Mon, 05 Jul 2021 15:42:22 +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, 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+incoming=patchwork.ozlabs.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/arm/syscalls.list | 2 +- sysdeps/unix/sysv/linux/csky/libc.abilist | 1 + sysdeps/unix/sysv/linux/generic/syscalls.list | 2 +- sysdeps/unix/sysv/linux/getsockopt.c | 3 ++ sysdeps/unix/sysv/linux/hppa/libc.abilist | 1 + sysdeps/unix/sysv/linux/hppa/syscalls.list | 2 +- 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/mips/syscalls.list | 2 +- 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 + 29 files changed, 103 insertions(+), 5 deletions(-) create mode 100644 socket/tst-sockopt-time64.c create mode 100644 socket/tst-sockopt.c Reviewed-by: Lukasz Majewski 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 f9fcc60335..b7d2a2ee4d 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 7d3c82b6d1..94481027d0 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 758d4bedd4..e4d514af90 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/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index 13441f7eb4..aad60a8871 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -25,7 +25,7 @@ personality EXTRA personality Ei:i __personality personality bind - bind i:ipi __bind bind getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname -getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt __getsockopt64 listen - listen i:ii __listen listen setsockopt - setsockopt i:iiibn __setsockopt setsockopt shutdown - shutdown i:ii __shutdown shutdown diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index 663db34dbd..f4471af348 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2350,6 +2350,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/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list index ed8b216d47..e58eff5bd3 100644 --- a/sysdeps/unix/sysv/linux/generic/syscalls.list +++ b/sysdeps/unix/sysv/linux/generic/syscalls.list @@ -8,5 +8,5 @@ listen - listen i:ii __listen listen getsockname - getsockname i:ipp __getsockname getsockname getpeername - getpeername i:ipp __getpeername getpeername setsockopt - setsockopt i:iiibn __setsockopt setsockopt -getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt __getsockopt64 shutdown - shutdown i:ii __shutdown shutdown 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 37edc65bad..87859d9399 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2303,6 +2303,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/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list index cd37573b89..2234f4ac07 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -4,7 +4,7 @@ bind - bind i:ipi __bind bind getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname -getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt __getsockopt64 listen - listen i:ii __listen listen setsockopt - setsockopt i:iiibn __setsockopt setsockopt shutdown - shutdown i:ii __shutdown shutdown diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index e667c6f166..1f411505ce 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2486,6 +2486,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 92db44126d..5aba8397e0 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 8b8decd376..318c50e3fa 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2430,6 +2430,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 51580fe799..b47cf67949 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2401,6 +2401,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 4ff4402991..a6e584ae98 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2398,6 +2398,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 ab4d0386d4..f4a6f9ecc5 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2395,6 +2395,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 b31edbbd77..2888edd627 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2393,6 +2393,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 dc49ba11e3..f7a731692b 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2401,6 +2401,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/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index f3621cdd51..13a658fb89 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -15,7 +15,7 @@ sysmips - sysmips i:iiii __sysmips sysmips bind - bind i:ipi __bind bind getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname -getsockopt - getsockopt i:iiiBN __getsockopt getsockopt +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt __getsockopt64 listen - listen i:ii __listen listen setsockopt - setsockopt i:iiibn __setsockopt setsockopt shutdown - shutdown i:ii __shutdown shutdown diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index e359e90654..5acbc04c87 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2440,6 +2440,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 fbbe434125..1f3058de78 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2457,6 +2457,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 476283b260..9584447358 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2490,6 +2490,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 97d486a10b..dff704b6b9 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2455,6 +2455,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 788ff9bc68..85fc46ab7e 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2310,6 +2310,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 8a23b8eb52..ebc2a90dac 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2307,6 +2307,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 177f3e1e83..8a1d118c67 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2450,6 +2450,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 5 13:42:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1500777 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=SV9OBOsa; dkim-atps=neutral Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GJRpc3jWZz9sX1 for ; Mon, 5 Jul 2021 23:48:08 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 077DD383F400 for ; Mon, 5 Jul 2021 13:48:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 077DD383F400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625492886; bh=FmSO8cYIhu696YaHTko/2Ye0UqvtSKX9khqjXEaDafE=; 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=SV9OBOsaAE7fA0y9aA/2ie8dqeSIjM6GLrcYbspGqUIaUmuKKpk650/cL1+bNBSTE rthz8Zx4N0LQWU3Ixl6QHdYY1vUwyJdw0JaZwlQEyj9UkPz9gNpE/nT/dKsl9kYkvu HfWaZPGriftTXyKGtLZ2pjJ6UEcdNna/5IZ0vBAA= 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 56AD6386FC27 for ; Mon, 5 Jul 2021 13:42:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 56AD6386FC27 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-592-kGueo73DM3O4_Yj0YsveCg-1; Mon, 05 Jul 2021 09:42:31 -0400 X-MC-Unique: kGueo73DM3O4_Yj0YsveCg-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 42030100CCC0 for ; Mon, 5 Jul 2021 13:42:30 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-5.ams2.redhat.com [10.36.115.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 338451002D71 for ; Mon, 5 Jul 2021 13:42:29 +0000 (UTC) To: libc-alpha@sourceware.org Subject: [PATCH 8/8] socket: Add time64 alias for setsockopt In-Reply-To: References: X-From-Line: 789471b308d81211a8788646f5997433a031e5d9 Mon Sep 17 00:00:00 2001 Message-Id: <789471b308d81211a8788646f5997433a031e5d9.1625492203.git.fweimer@redhat.com> Date: Mon, 05 Jul 2021 15:42:27 +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+incoming=patchwork.ozlabs.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/arm/syscalls.list | 2 +- sysdeps/unix/sysv/linux/csky/libc.abilist | 1 + sysdeps/unix/sysv/linux/generic/syscalls.list | 2 +- sysdeps/unix/sysv/linux/hppa/libc.abilist | 1 + sysdeps/unix/sysv/linux/hppa/syscalls.list | 4 ++-- 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/mips/syscalls.list | 2 +- 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 + 26 files changed, 41 insertions(+), 5 deletions(-) Reviewed-by: Lukasz Majewski 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 b7d2a2ee4d..965d7d1d15 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 94481027d0..f371b09561 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist @@ -273,6 +273,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 e4d514af90..79d79fad05 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist @@ -270,6 +270,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/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list index aad60a8871..2e875d1049 100644 --- a/sysdeps/unix/sysv/linux/arm/syscalls.list +++ b/sysdeps/unix/sysv/linux/arm/syscalls.list @@ -27,7 +27,7 @@ getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt __getsockopt64 listen - listen i:ii __listen listen -setsockopt - setsockopt i:iiibn __setsockopt setsockopt +setsockopt - setsockopt i:iiibn __setsockopt setsockopt __setsockopt64 shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket socketpair - socketpair i:iiif __socketpair socketpair diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist index f4471af348..c383be1fe6 100644 --- a/sysdeps/unix/sysv/linux/csky/libc.abilist +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2405,6 +2405,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/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list index e58eff5bd3..062bf5f92e 100644 --- a/sysdeps/unix/sysv/linux/generic/syscalls.list +++ b/sysdeps/unix/sysv/linux/generic/syscalls.list @@ -7,6 +7,6 @@ bind - bind i:ipi __bind bind listen - listen i:ii __listen listen getsockname - getsockname i:ipp __getsockname getsockname getpeername - getpeername i:ipp __getpeername getpeername -setsockopt - setsockopt i:iiibn __setsockopt setsockopt +setsockopt - setsockopt i:iiibn __setsockopt setsockopt __setsockopt64 getsockopt - getsockopt i:iiiBN __getsockopt getsockopt __getsockopt64 shutdown - shutdown i:ii __shutdown shutdown diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist index 87859d9399..ebfa48dc36 100644 --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2358,6 +2358,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 2234f4ac07..0f6f735955 100644 --- a/sysdeps/unix/sysv/linux/hppa/syscalls.list +++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list @@ -1,12 +1,12 @@ # 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 getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt __getsockopt64 listen - listen i:ii __listen listen -setsockopt - setsockopt i:iiibn __setsockopt setsockopt +setsockopt - setsockopt i:iiibn __setsockopt setsockopt __setsockopt64 shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket socketpair - socketpair i:iiif __socketpair socketpair diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index 1f411505ce..109f2276d0 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2542,6 +2542,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 5aba8397e0..04f73b235f 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist @@ -274,6 +274,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 318c50e3fa..26eedca03b 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2485,6 +2485,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 b47cf67949..7f824392fc 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2456,6 +2456,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 a6e584ae98..1c23bedc52 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2453,6 +2453,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 f4a6f9ecc5..684c5759b3 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2450,6 +2450,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 2888edd627..2bb3fdca5c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2448,6 +2448,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 f7a731692b..18cce12763 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2456,6 +2456,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/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list index 13a658fb89..c6f756c7c2 100644 --- a/sysdeps/unix/sysv/linux/mips/syscalls.list +++ b/sysdeps/unix/sysv/linux/mips/syscalls.list @@ -17,7 +17,7 @@ getpeername - getpeername i:ipp __getpeername getpeername getsockname - getsockname i:ipp __getsockname getsockname getsockopt - getsockopt i:iiiBN __getsockopt getsockopt __getsockopt64 listen - listen i:ii __listen listen -setsockopt - setsockopt i:iiibn __setsockopt setsockopt +setsockopt - setsockopt i:iiibn __setsockopt setsockopt __setsockopt64 shutdown - shutdown i:ii __shutdown shutdown socket - socket i:iii __socket socket socketpair - socketpair i:iiif __socketpair socketpair diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist index 5acbc04c87..e12ed083da 100644 --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2495,6 +2495,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 1f3058de78..340695d018 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2512,6 +2512,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 9584447358..588671f098 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2545,6 +2545,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 dff704b6b9..66aae5a9bd 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2510,6 +2510,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 a4780a9d33..556f7105d0 100644 --- a/sysdeps/unix/sysv/linux/setsockopt.c +++ b/sysdeps/unix/sysv/linux/setsockopt.c @@ -100,3 +100,6 @@ setsockopt (int fd, int level, int optname, const void *optval, socklen_t len) return r; } 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 85fc46ab7e..12660470fa 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2365,6 +2365,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 ebc2a90dac..119c2caddc 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2362,6 +2362,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 8a1d118c67..124f3e7e42 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/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