summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/socket/server.scm4
1 files changed, 3 insertions, 1 deletions
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 <davet@gnu.org>
+;;; Copyright © 2021 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; 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)