From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 03 07:21:49 2023 Received: (at submit) by debbugs.gnu.org; 3 Aug 2023 11:21:49 +0000 Received: from localhost ([127.0.0.1]:50956 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRWOr-0007M7-2f for submit@debbugs.gnu.org; Thu, 03 Aug 2023 07:21:49 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37898) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRWOo-0007Lq-6T for submit@debbugs.gnu.org; Thu, 03 Aug 2023 07:21:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRWOi-0000vL-6U for guix-patches@gnu.org; Thu, 03 Aug 2023 07:21:40 -0400 Received: from magnesium.8pit.net ([45.76.88.171]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qRWOe-0006GF-2I; Thu, 03 Aug 2023 07:21:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=opensmtpd; bh=piq3HuAmYz 0ZSublWNYw+q7hZm+yVf96UF/kswA9A+k=; h=date:subject:to:from; d=soeren-tempel.net; b=l9btCTpLxNOgBzx2WY4svglm/BKv0oXPirfmogQhs1Wpvmu 5fM4UtjB1wtcf35Hvy+sAArjDRKQ6WpUSl3L4mja3UkNAgkEHj8exxlXGjjArzfbZk9cEy 7c9pa9TBpvWESLyB6jAyYr03UxvfF2B1o+HqKVagSEcGt6Kz90r3Eg= Received: from localhost ( [2a02:8109:3b40:398a:3ccd:55c4:c2a:92dc]) by magnesium.8pit.net (OpenSMTPD) with ESMTPSA id 9678ec02 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:YES); Thu, 3 Aug 2023 13:21:31 +0200 (CEST) From: soeren@soeren-tempel.net To: guix-patches@gnu.org Subject: [PATCH] syscalls: Consistently use existing linux? definition Date: Thu, 3 Aug 2023 13:20:09 +0200 Message-ID: <20230803112123.6866-1-soeren@soeren-tempel.net> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=45.76.88.171; envelope-from=soeren@soeren-tempel.net; helo=magnesium.8pit.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) From: Sören Tempel Instead of duplicating this existing logic across the source file. This will make it easier to add additional linux targets (e.g. linux-musl) in the future. * guix/build/syscalls.scm (readdir*): Use linux? constant. * guix/build/syscalls.scm (write-socket-address!): Use linux? constant. * guix/build/syscalls.scm (read-socket-address): Use linux? constant. Signed-off-by: Sören Tempel --- guix/build/syscalls.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index d947b010d3..c9c0bf594d 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -1244,7 +1244,7 @@ (define (readdir-procedure name-field-offset sizeof-dirent-header (define readdir* ;; Decide at run time which one must be used. - (if (string-contains %host-type "linux-gnu") + (if linux? (readdir-procedure (c-struct-field-offset %struct-dirent-header/linux name) sizeof-dirent-header/linux @@ -1664,7 +1664,7 @@ (define (write-socket-address!/hurd sockaddr bv index) (error "unsupported socket address" sockaddr))))) (define write-socket-address! - (if (string-contains %host-type "linux-gnu") + (if linux? write-socket-address!/linux write-socket-address!/hurd)) @@ -1696,7 +1696,7 @@ (define* (read-socket-address/hurd bv #:optional (index 0)) (vector family))))) (define read-socket-address - (if (string-contains %host-type "linux-gnu") + (if linux? read-socket-address/linux read-socket-address/hurd)) From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 14 18:07:35 2023 Received: (at 65036-done) by debbugs.gnu.org; 14 Aug 2023 22:07:35 +0000 Received: from localhost ([127.0.0.1]:34523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVfio-0004VE-Vc for submit@debbugs.gnu.org; Mon, 14 Aug 2023 18:07:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVfio-0004V3-0X for 65036-done@debbugs.gnu.org; Mon, 14 Aug 2023 18:07:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVfig-0003cL-C3; Mon, 14 Aug 2023 18:07:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=lvyaafqUc1sSOchO2bhcYeqcdx6ucnXKnx43B/FlUTQ=; b=BL+aENBaDFct9NFWMLgh SER/iE+DLj3ubyLCnjmqj6Qupz/NNxhpLHwr3GKhDTUft94hdLjfaJxdkUuARaV12s9E12rcIK8/X OGB/C5En7ThSjRBCjf/D4QrRiHkzXO85P+mLQavlw0dddblDhlt4A4G8xXTEX4AEC/L1NtS6iOjDP +k5pB9lwOm6wBkuRmT3q2UJFXkSZeQNami/2CvqQeCwqlMpT/8YmW1XEoNI/81JsSiLVCvfMt+LO0 aS8zI/MwTtiN3Ms8g5slm/XkFrhOJ3QMEIFR8jhypMyRjnM2GawSOMK8voTzTuxg9upFODIXPAPkg kEMGdG9cK3BpGA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: soeren@soeren-tempel.net Subject: Re: bug#65036: [PATCH] syscalls: Consistently use existing linux? definition References: <20230803112123.6866-1-soeren@soeren-tempel.net> Date: Tue, 15 Aug 2023 00:07:21 +0200 In-Reply-To: <20230803112123.6866-1-soeren@soeren-tempel.net> (soeren@soeren-tempel.net's message of "Thu, 3 Aug 2023 13:20:09 +0200") Message-ID: <87wmxx9t2e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65036-done Cc: 65036-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, soeren@soeren-tempel.net skribis: > From: S=C3=B6ren Tempel > > Instead of duplicating this existing logic across the source file. This > will make it easier to add additional linux targets (e.g. linux-musl) in > the future. > > * guix/build/syscalls.scm (readdir*): Use linux? constant. > * guix/build/syscalls.scm (write-socket-address!): Use linux? constant. > * guix/build/syscalls.scm (read-socket-address): Use linux? constant. > > Signed-off-by: S=C3=B6ren Tempel Applied and tweaked the commit log. Thanks! Ludo=E2=80=99. From unknown Thu Jun 19 14:29:45 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 12 Sep 2023 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator