From e4a954734d005746f9c7976d39ec6bfcf8f5ca75 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" Date: Thu, 18 Mar 2021 08:32:15 +0100 Subject: Use inet-pton instead of inet-aton. * web/socket/server.scm (make-server-socket): Add #:family parameter and use it for inet-pton. --- web/socket/server.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/socket/server.scm b/web/socket/server.scm index cd52220..2d1694d 100644 --- a/web/socket/server.scm +++ b/web/socket/server.scm @@ -1,5 +1,6 @@ ;;; guile-websocket --- WebSocket client/server ;;; Copyright © 2015 David Thompson +;;; Copyright © 2021 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of guile-websocket. ;;; @@ -55,7 +56,8 @@ string." (define* (make-server-socket #:key (host #f) - (addr (if host (inet-aton host) INADDR_LOOPBACK)) + (family AF_INET) + (addr (if host (inet-pton family host) INADDR_LOOPBACK)) (port 8080)) (let ((sock (socket PF_INET SOCK_STREAM 0))) (setsockopt sock SOL_SOCKET SO_REUSEADDR 1) -- cgit v1.2.3