Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.45 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796031858; b=REcknQPscaNgGtToN50C+21mQSXmKHjSeo0OD6jjCLwbl3nX1dIxl6+CFczZcTmKDqXQ GchzDklDXk484h1w89X512sSUM/Lzh1Z4hXtp6jI0DJiSEpDdUNnniP97Rd1ss3lq6qk0 tSrg1GKxXPwH1ZCYQoZy2LtxLfyUavqRkJiHskrljC1pnuSWZ8lz4YJPYosxUenErjQeb SlytKWFAC9vIQN/m03iOdMP9lvJco8z18oodNdR8vm2dttXqbaUW8AyQM2j7m861cLDgD Bhvkiw7aQhmAU2e1XPfG8TbnfKbxThWKnL8CFr2crjDtS+OaHeeUG5fGnCobqFzQx6g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796031858; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-Id:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=Z1OUC/bmR2sfwlH2fpQf8ZUTZKkHedr5JSmcbXrIAdo=; b=vOJgWVVjiAqEupKlTi4ctSRPZK4oOxGTx9XFcw/6zlnB0ODx+6Aac89GccWSHVffYyhV rxIru0N2o8c1wRzXtEPEMND19IHIVZIJfiXWFU5eHpVajEFOC6kxpMxp22GpyRQUHYPvR DBiBUmbu/WMeUHSmsaQq9gt/QulPoY/SREmtcRKp5OjYMTGYcDI5DIm6jXvAQf9iIrYtW q0lEvCS5S/gOsSqVdIYkGF0yJ7YgvJhxzN9p14GldjOMOr7GDTm04osdU0UhC0lFiXa0z Us4q5qhz4wjENgDRjZqYC2GKLT+GzcSyP9O8yE5ajaQZ8nCivBgsEvSVIb1whWmh7tg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=googlemail.com; spf=pass smtp.mailfrom=googlemail.com; dkim=pass header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=OufqeiMv; arc=none smtp.remote-ip=209.85.218.45 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB2B2606A320 for ; Mon, 30 Nov 2026 09:44:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BB2B2606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=googlemail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.a=rsa-sha256 header.s=20260707 header.b=OufqeiMv Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-c5126505cb3so1357401766b.0 for ; Mon, 30 Nov 2026 01:44:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20260707; t=1796031856; x=1796636656; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Z1OUC/bmR2sfwlH2fpQf8ZUTZKkHedr5JSmcbXrIAdo=; b=OufqeiMvHVUeqlc3sgqYpLM0RjTrj4CgZ3rc/+eu/eh27pzQ/YvH6VvFDgwmV5fmg8 kyfaqDqbRQrWQPoZBRH3Jvcl+lKIip3XXixLjGShkCYJP92UYAfzJQzcYq2PLTgvWR9X pWI83qcW52aAqIOl7QAjGr3hlHsWuLZbrniuquqeJVKt2vAq4RrTLTfI/Emxh0RmxpRP l2ERjGoFDiZo069L7XO/jWCljxxKusCj7htHxyoMbbQ84r5pH1QJnmPhCwX8I9Z9O/Ub 2K3PHxFlzfa24/5xryFLp02/wsNMBOq3Cp8JA/OXwSalAgO5iLC/ubfSg04BD3XCLQUj VYjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796031856; x=1796636656; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Z1OUC/bmR2sfwlH2fpQf8ZUTZKkHedr5JSmcbXrIAdo=; b=l+F/54dy14p56BOo31qg8IyULNXiNnujP8Hwao2hGsAgtYXfHVJSUT3jlE3K4tYWWp n7yhdZtoV5h7P1Xn2lBxsktSXKGbBLwp/FqFBeoJwU86xQcKk2uP5kgJ8Zj1R2v8Nhqa D/juUceMR0CtZ1ejn7td72A3ujcYZRr0uKbUHX0zV8evqJNzWmNjbvxKo+WvQANBfahO ajOJ8nhwuygcEJY/fGUUg0rla8sJ+vgdApBig7t7hAL5QAVMGUwSQp2GCNe6yUwJjE+Z SJWuaNa/lSCTRbPZKGyWuI3u2VT6uWP4Z6bxYiih7vyH97IR3E4KoCeAJPsfK04D1Dr+ MhCw== X-Gm-Message-State: APuU4Z8q8++Keiz5oJLZDAvdC5Wd7S4Z4FRJNzwjKPz2e0e9qVHhZNiO glDqMlg5voiOINfkblCUyQfaShZRMCAIhlObYrzGkORa1lbpXjO1ZUJCkjXnXg== X-Gm-Gg: AZFdTZdoZwjquF9OskPZOibgREczOy3Iibvoo+4cN+Mjmra1LMUvMhhefaHKgY2NHCt vK3B3fvvAWtvnf37kdt/YDe55AqOxqWrk14K2wtVtGSRbAIyuS+VGbX4SrrH7zgM/CyzYlxt18w raorK6BX+ZkXLDeddQdTAjSg7rn66fxthiDbADUhcs4dtKnux5wRlq4EoWhzfvLyMxNvdESzppE KcRhvoUzxu2LYWCrj6Ve/4qK18NUM9EILx0aG/geIRuw420qT5ZRY1ByCM7eIFWtgDtYZ3wVIIk BXBsz6YGRKX5XUPjUQSlSwn03ilpZLJ3DFWydL2K3A1QWj2KtC+B4Nykup030z0T/07IS2zKOAU 8a5rGr/7jTK1UPWInDQKb7HWyVin8cpByu2AWC+NHborUI2OrDRqMdWl+muOjxs2Vc2INo8vu9M 66J3+foGqVxqEeBkkUS/D8NM9DJtrOM2DSt1d7Vd8EexcZ5qqF2XR3or9ipF85oWNPf9Np8BMUN FZa6OD9E0GUXqVnRUPM48HKBi551OENnY0laPY3ikLJZO1Tmqu4t3/Uxu7L6//mHJGjkxGziTnX q4txjPCUHtHTwsaRo55ibo0Br+S/9gBHEl+iVnpFcYJpWB389mnIaIicBrelY9YmGXTl9F6zTX0 o45aUb3RZ X-Received: by 2002:a17:907:1c81:b0:c3f:7e8:235d with SMTP id a640c23a62f3a-c513a4b0ca4mr2582762966b.5.1796031855976; Mon, 30 Nov 2026 01:44:15 -0800 (PST) Received: from development2.visionsystems.local (mail.visionsystems.de. [213.209.99.202]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513acfe25asm1137439566b.11.2026.11.30.01.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 01:44:15 -0800 (PST) From: Yegor Yefremov To: xenomai@lists.linux.dev Cc: Jan Kiszka , Florian Bezdeka , Yegor Yefremov Subject: [PATCH v3 3/5] lib/cobalt: Use the time64 select() path without __TIMESIZE Date: Mon, 30 Nov 2026 10:44:10 +0100 Message-Id: <20261130094412.1802041-4-yegorslists@googlemail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261130094412.1802041-1-yegorslists@googlemail.com> References: <20261130094412.1802041-1-yegorslists@googlemail.com> X-Mailing-List: xenomai@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On 32-bit uClibc-ng and musl with 64-bit time_t, the __TIMESIZE check fails, so select() passes the caller's 64-bit struct timeval to sc_cobalt_select, which expects the old 32-bit layout. Use XN_TIME64_ON_32BIT instead, so that sc_cobalt_pselect64 is used. For the fallback, call __STD(select()): with glibc it is redirected to __real___select64 as before, while the other C libraries only have select(), which is 64-bit there. Fixes: c2b883446b80 ("y2038: lib/cobalt: Implement necessary wrappers for y2038 support") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Yegor Yefremov --- lib/cobalt/wrappers_time64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/cobalt/wrappers_time64.c b/lib/cobalt/wrappers_time64.c index 024d22704..76a30f2ed 100644 --- a/lib/cobalt/wrappers_time64.c +++ b/lib/cobalt/wrappers_time64.c @@ -768,7 +768,7 @@ COBALT_IMPL_TIME64(int, setsockopt, __setsockopt64, return __STD(setsockopt(fd, level, optname, optval, optlen)); } -#if __USE_TIME_BITS64 && __TIMESIZE == 32 +#ifdef XN_TIME64_ON_32BIT #define USEC_PER_SEC 1000000L #define NSEC_PER_USEC 1000L @@ -805,8 +805,8 @@ static inline int do_select(int __nfds, fd_set *__restrict __readfds, pthread_setcanceltype(oldtype, NULL); if (err == -EADV || err == -EPERM || err == -ENOSYS) { - err = __STD(__select64(__nfds, __readfds, __writefds, - __exceptfds, __timeout)); + err = __STD(select(__nfds, __readfds, __writefds, + __exceptfds, __timeout)); } else if (__timeout) { __timeout->tv_sec = to.tv_sec; __timeout->tv_usec = to.tv_nsec / 1000; -- 2.34.1