Subject: bug#79451: (web server http) make-default-socket hard-codes PF_INET

From: "Athena L. Martin" <[email-masked]>
Date: Mon, 15 Sep 2025 01:09:21 +0100

scheme@(guile-user)> (use-modules (web server))
scheme@(guile-user)> (define (handler request body) (values '((content-type . 
(text/plain))) "Hello world"))
scheme@(guile-user)> (run-server handler 'http `(#:family ,AF_INET6 #:port 
8081))

Expected result: A Web server starts and serves "Hello world" to all requests, 
via IPv6.
Actual result:
ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure bind: Address family not supported by protocol

I traced this problem to make-default-socket, which hard-codes PF_INET, 
heedless of the fact that different address families may require different 
protocol families as well (indeed, the two terms are nearly synonymous 
nowadays).

Guile version:
guile (GNU Guile) 3.0.9

Distributor: GNU Guix