Hi Alex, hi Mike,

attached is a small patch to make httpGate work on OpenBSD (IPV6 only). Tested 
successfully.


diff --git a/src/httpGate.c b/src/httpGate.c
index dc8b58d..6c4f2be 100644
--- a/src/httpGate.c
+++ b/src/httpGate.c
@@ -232,8 +232,10 @@ static int gatePort(unsigned short port) {
    if ((sd = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
       exit(1);
    n = 0;
+#ifndef __OpenBSD__
    if (setsockopt(sd, IPPROTO_IPV6, IPV6_V6ONLY, &n, sizeof(n)) < 0)
       exit(1);
+#endif
    memset(&addr, 0, sizeof(addr));
    addr.sin6_family = AF_INET6;
    addr.sin6_addr = in6addr_any;

Cheers,
Frithjof

On Tue Mar 9, 2021 at 4:26 PM CET, Alexander Burger wrote:
> Hi Mike,
>
> > I have successfully compiled and run tests for pil21 on openbsd 6.8
> > Documentation and full system portability is a question of future research.
> > 
> > $ pil +
> > : (version)
> > 21.3.5
> > -> (21 3 5)
> > : (call 'uname '-a)
> > OpenBSD openbsd.localdomain 6.8 GENERIC.MP#5 amd64
> > : (** 2 222)
> > -> 6739986666787659948666753771754907668409286105635143120275902562304
>
> Cool, good news! Thanks a lot!
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to