GNU bug report logs - #66054
[PATCH v3] syscalls: Consistently use existing linux? definition

Previous Next

Package: guix-patches;

Reported by: soeren <at> soeren-tempel.net

Date: Sun, 17 Sep 2023 15:23:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 66054 in the body.
You can then email your comments to 66054 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#66054; Package guix-patches. (Sun, 17 Sep 2023 15:23:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to soeren <at> soeren-tempel.net:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 17 Sep 2023 15:23:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: soeren <at> soeren-tempel.net
To: guix-patches <at> gnu.org
Cc: 65486 <at> debbugs.gnu.org, ludo <at> gnu.org
Subject: [PATCH v3] syscalls: Consistently use existing linux? definition
Date: Sun, 17 Sep 2023 17:21:48 +0200
From: Sören Tempel <soeren <at> soeren-tempel.net>

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 <soeren <at> soeren-tempel.net>
---
 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))
 




Added blocking bug(s) 66525 Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 13 Oct 2023 15:55:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 66054 <at> debbugs.gnu.org and soeren <at> soeren-tempel.net Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 23 Oct 2023 10:13:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Nov 2023 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.