~ruther/guix-local

b56cbe8974c328a6c7bc28906478ef1b191ada4c — Jesse Dowell 6 years ago 3664020
syscalls: Properly match %HOST-TYPE.

Fixes <https://bugs.gnu.org/41546>.

Regression introduced in 0d371c633f7308cfde2432d6119d386a5c63198c.

* guix/build/syscalls.scm (write-socket-address!)
(read-socket-address): Use 'string-contains' instead of
'string-suffix?'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
1 files changed, 2 insertions(+), 2 deletions(-)

M guix/build/syscalls.scm
M guix/build/syscalls.scm => guix/build/syscalls.scm +2 -2
@@ 1404,7 1404,7 @@ bytevector BV at INDEX."
           (error "unsupported socket address" sockaddr)))))

(define write-socket-address!
  (if (string-suffix? "linux-gnu" %host-type)
  (if (string-contains %host-type "linux-gnu")
      write-socket-address!/linux
      write-socket-address!/hurd))



@@ 1436,7 1436,7 @@ bytevector BV at INDEX."
           (vector family)))))

(define read-socket-address
  (if (string-suffix? "linux-gnu" %host-type)
  (if (string-contains %host-type "linux-gnu")
      read-socket-address/linux
      read-socket-address/hurd))