web-server: Add fnctl fallback on platforms without accept4 #9

Manually merged
cbaines merged 1 commit from campbellr/guile-knots:macos-support into trunk 2026-05-11 22:44:27 +02:00
Contributor

I've been using guile-knots in a project of mine and I noticed that the web-server didn't work on macOS (I sometimes only have easy access to a mac for local development).

I'm not sure how willing you are to support other platforms, but if you are open to it, the patch is pretty straightforward.

I've been using guile-knots in a project of mine and I noticed that the web-server didn't work on macOS (I sometimes only have easy access to a mac for local development). I'm not sure how willing you are to support other platforms, but if you are open to it, the patch is pretty straightforward.
accept4 doesn't exist in macOS.

This adds an accept wrapper that falls back to fcntl to set the
equivalent options. It's not atomic, but at least it works...
cbaines manually merged commit d05c16b530 into trunk 2026-05-11 22:44:27 +02:00
Owner

Awesome, thanks for this Ryan! At the moment I'm not testing for anything other than Linux unfortunately, but I'm happy to add support for other platforms.

Awesome, thanks for this Ryan! At the moment I'm not testing for anything other than Linux unfortunately, but I'm happy to add support for other platforms.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cbaines/guile-knots!9
No description provided.