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

Previous Next

Package: guix-patches;

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

Date: Thu, 3 Aug 2023 11:22:01 UTC

Severity: normal

Tags: patch

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: soeren <at> soeren-tempel.net
Subject: bug#65036: closed (Re: bug#65036: [PATCH] syscalls: Consistently
 use existing linux? definition)
Date: Mon, 14 Aug 2023 22:08:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#65036: [PATCH] syscalls: Consistently use existing linux? definition

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 65036 <at> debbugs.gnu.org.

-- 
65036: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65036
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: soeren <at> soeren-tempel.net
Cc: 65036-done <at> debbugs.gnu.org
Subject: Re: bug#65036: [PATCH] syscalls: Consistently use existing linux?
 definition
Date: Tue, 15 Aug 2023 00:07:21 +0200
Hi,

soeren <at> soeren-tempel.net skribis:

> 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>

Applied and tweaked the commit log.  Thanks!

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: soeren <at> soeren-tempel.net
To: guix-patches <at> gnu.org
Subject: [PATCH] syscalls: Consistently use existing linux? definition
Date: Thu,  3 Aug 2023 13:20:09 +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))
 



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

Previous Next


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