From SRS0=gtrb=U5=lists.debian.org=bounce-debian-hurd=samuel.thibault=ens-lyon.org@bounce.ens-lyon.org Thu Feb  6 19:38:28 2025
Return-Path: <SRS0=gtrb=U5=lists.debian.org=bounce-debian-hurd=samuel.thibault=ens-lyon.org@bounce.ens-lyon.org>
X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on
	begin.youpi.perso.aquilenet.fr
X-Spam-Level: *
X-Spam-Status: No, score=1.8 required=8.0 tests=BAYES_50,
	HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD
	autolearn=disabled version=4.0.1
X-Spam-Language: 
Delivered-To: samuel.thibault@aquilenet.fr
Received: from mail.aquilenet.fr [185.233.100.1]
	by begin.youpi.perso.aquilenet.fr with IMAP (fetchmail-6.4.39)
	for <samy@localhost> (single-drop); Thu, 06 Feb 2025 19:38:28 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by hera.aquilenet.fr (Postfix) with ESMTP id D8D76C13
	for <samuel.thibault@aquilenet.fr>; Thu,  6 Feb 2025 19:38:27 +0100 (CET)
Authentication-Results: hera.aquilenet.fr;
	none
X-Virus-Scanned: Debian amavis at hera.aquilenet.fr
Received: from hera.aquilenet.fr ([127.0.0.1])
 by localhost (hera.aquilenet.fr [127.0.0.1]) (amavis, port 10024) with ESMTP
 id JMrlap21ebQp for <samuel.thibault@aquilenet.fr>;
 Thu,  6 Feb 2025 19:38:27 +0100 (CET)
Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138])
	by hera.aquilenet.fr (Postfix) with ESMTPS id B69AB574
	for <samuel.thibault@aquilenet.fr>; Thu,  6 Feb 2025 19:38:26 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by sonata.ens-lyon.org (Postfix) with ESMTP id 84514A0535
	for <samuel.thibault@aquilenet.fr>; Thu,  6 Feb 2025 19:38:26 +0100 (CET)
Received: from sonata.ens-lyon.org ([127.0.0.1])
	by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id QommcmjbrCY0 for <samuel.thibault@aquilenet.fr>;
	Thu,  6 Feb 2025 19:38:26 +0100 (CET)
X-policyd-weight: using cached result; rate:hard: -6.1
Received: from bendel.debian.org (bendel.debian.org [82.195.75.100])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits))
	(No client certificate requested)
	by sonata.ens-lyon.org (Postfix) with ESMTPS id 6C33AA1A90
	for <samuel.thibault@ens-lyon.org>; Thu,  6 Feb 2025 19:38:26 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
	by bendel.debian.org (Postfix) with QMQP
	id EB9EE2062C; Thu,  6 Feb 2025 18:38:25 +0000 (UTC)
X-Mailbox-Line: From debian-hurd-request@lists.debian.org  Thu Feb  6 18:38:25 2025
Old-Return-Path: <crupest@crupest.life>
X-Original-To: lists-debian-hurd@bendel.debian.org
Delivered-To: lists-debian-hurd@bendel.debian.org
Received: from localhost (localhost [127.0.0.1])
	by bendel.debian.org (Postfix) with ESMTP id C095E205F8
	for <lists-debian-hurd@bendel.debian.org>; Thu,  6 Feb 2025 18:38:17 +0000 (UTC)
X-Virus-Scanned: at lists.debian.org with policy bank en-lt
X-Amavis-Spam-Status: No, score=-3.907 tagged_above=-10000 required=5.3
	tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499,
	LDO_WHITELIST=-5, PDS_OTHER_BAD_TLD=1.999,
	RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001,
	RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RDNS_NONE=0.793]
	autolearn=no autolearn_force=no
Received: from bendel.debian.org ([127.0.0.1])
	by localhost (lists.debian.org [127.0.0.1]) (amavisd-new, port 2525)
	with ESMTP id ju-lkBylEbEh for <lists-debian-hurd@bendel.debian.org>;
	Thu,  6 Feb 2025 18:38:14 +0000 (UTC)
X-policyd-weight: using cached result; rate:hard: -4.6
Received: from mail.crupest.life (unknown [43.135.94.23])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(Client did not present a certificate)
	by bendel.debian.org (Postfix) with ESMTPS id 083C820613
	for <debian-hurd@lists.debian.org>; Thu,  6 Feb 2025 18:38:13 +0000 (UTC)
From: Yuqian Yang <crupest@crupest.life>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crupest.life;
	s=mail; t=1738867090;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:cc:mime-version:mime-version:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=gYsOHop++iddvKfY46wEAoy5fnWxdpVfOcEy03CknQc=;
	b=avyQbrJyj+Xv4HsrjWtBerrglTTpGSG6blqOG7py/QD91kpaOQkR8lvJ8Np2/OZMkzlN1W
	rHN6UNel/YOyoi8E5FN+E6xlobmUdFWJ5p5uc9cBmB93DgZOGQctp1IHYwfuA8jDv/3xqY
	1v9v85iK2g78jWEx4cyrmFE4AlGTPQx1sztAW2rt7mRH9tsji95b1oHOdqiFK9G5fprybV
	n9CNtBjJ0PdT6ZMsAe69CmpQgEeb6k4P0z1J43SbTL7n35jOH5GEZ2ptYh5pq8+9gh5R4D
	HOc2z63y7nch5Pnu4gsHKoV6fnVbcJwYY3AsM9w23IxOMADEOpdb9vnpuNKS0A==
To: debian-hurd@lists.debian.org
Cc: Yuqian Yang <crupest@crupest.life>
Subject: [PATCH 1/1] Disable gettid for GNU/Hurd.
Date: Fri,  7 Feb 2025 02:37:44 +0800
Message-ID: <20250206183744.211-2-crupest@crupest.life>
In-Reply-To: <20250206183744.211-1-crupest@crupest.life>
References: <20250206183744.211-1-crupest@crupest.life>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rc-Virus: 2007-09-13_01
X-Rc-Spam: 2008-11-04_01
Resent-Message-ID: <DjKHuhh150J.A.pUzN.hGQpnB@bendel>
Resent-From: debian-hurd@lists.debian.org
X-Mailing-List: <debian-hurd@lists.debian.org> archive/latest/31746
X-Loop: debian-hurd@lists.debian.org
List-Id: <debian-hurd.lists.debian.org>
List-URL: <https://lists.debian.org/debian-hurd/>
List-Post: <mailto:debian-hurd@lists.debian.org>
List-Help: <mailto:debian-hurd-request@lists.debian.org?subject=help>
List-Subscribe: <mailto:debian-hurd-request@lists.debian.org?subject=subscribe>
List-Unsubscribe: <mailto:debian-hurd-request@lists.debian.org?subject=unsubscribe>
Precedence: list
Resent-Sender: debian-hurd-request@lists.debian.org
List-Archive: https://lists.debian.org/msgid-search/20250206183744.211-2-crupest@crupest.life
Resent-Date: Thu,  6 Feb 2025 18:38:25 +0000 (UTC)
X-Rspamd-Action: no action
X-Rspamd-Server: hera
X-Rspamd-Queue-Id: D8D76C13
X-Spamd-Bar: ----
X-Spamd-Result: default: False [-4.81 / 15.00];
	BAYES_HAM(-3.00)[99.99%];
	NEURAL_HAM(-3.00)[-1.000];
	MID_CONTAINS_FROM(1.00)[];
	R_MISSING_CHARSET(0.50)[];
	MAILLIST(-0.20)[generic];
	MIME_GOOD(-0.10)[text/plain];
	HAS_LIST_UNSUB(-0.01)[];
	FORGED_RECIPIENTS_MAILLIST(0.00)[];
	RCVD_TLS_LAST(0.00)[];
	MIME_TRACE(0.00)[0:+];
	ARC_NA(0.00)[];
	RCPT_COUNT_TWO(0.00)[2];
	FORGED_SENDER_MAILLIST(0.00)[];
	FROM_NEQ_ENVFROM(0.00)[crupest@crupest.life,SRS0=gtrb=U5=lists.debian.org=bounce-debian-hurd=samuel.thibault=ens-lyon.org@bounce.ens-lyon.org];
	FROM_HAS_DN(0.00)[];
	TO_DN_SOME(0.00)[];
	RCVD_COUNT_SEVEN(0.00)[9]
Status: O
Content-Length: 629

GNU/Hurd does not support gettid. It is specific to Linux.
---
 src/utils/threadpool.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/utils/threadpool.cc b/src/utils/threadpool.cc
index 6fa2e88..97efc36 100644
--- a/src/utils/threadpool.cc
+++ b/src/utils/threadpool.cc
@@ -42,6 +42,8 @@
 // Linux.
 #if defined(__ANDROID__)
 static pid_t GetTid() { return gettid(); }
+#elif defined(__GNU__)
+// GNU/Hurd does not support gettid.
 #elif defined(__GLIBC__)
 // The glibc wrapper for the gettid() system call was added in glibc 2.30.
 // Emulate it for older versions of glibc.
-- 
Yuqian Yang <crupest@crupest.life>


