mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
syscalls: Consistently use existing linux? definition.
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*, write-socket-address!) (read-socket-address): Use linux? constant. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I833c1d1630dcb8319584de1ea918cb22696f0058
This commit is contained in:
parent
54e6788267
commit
dae956e796
1 changed files with 3 additions and 3 deletions
|
@ -1245,7 +1245,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
|
||||
|
@ -1665,7 +1665,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))
|
||||
|
||||
|
@ -1697,7 +1697,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))
|
||||
|
||||
|
|
Loading…
Reference in a new issue