Firstly, I find boo to be promising lovely project. Thanks for creating it, and publishing it under a permissive license!
If attempting to build on FreeBSD (e.g. 15.0-RELEASE) the compilation fails with an unsupported OS error message.
The following trivial patch makes the build problem go away, and after applying it seems I'm also able to launch a boo session, detach and reattach it successfully.
diff --git a/src/pty.zig b/src/pty.zig
index b245b40..b3597c7 100644
--- a/src/pty.zig
+++ b/src/pty.zig
@@ -18,6 +18,11 @@ pub const Tio = switch (builtin.os.tag) {
pub const IOCSWINSZ: c_ulong = 0x80087467;
pub const IOCSCTTY: c_ulong = 0x20007461;
},
+ .freebsd => struct {
+ pub const IOCGWINSZ: c_ulong = std.c.T.IOCGWINSZ;
+ pub const IOCSWINSZ: c_ulong = std.c.T.IOCSWINSZ;
+ pub const IOCSCTTY: c_ulong = std.c.T.IOCSCTTY;
+ },
.linux => struct {
pub const IOCGWINSZ: c_ulong = std.os.linux.T.IOCGWINSZ;
pub const IOCSWINSZ: c_ulong = std.os.linux.T.IOCSWINSZ;
It would be neat to provide a pull request instead of merely a bug report. However I'd much rather the right fix rather than a* fix be applied.
As we can learn from OpenBSD Porter's Handbook, its better to Test for features, not for specific OSes.
My experience with ziglang is limited to only what I've learned by building boo this morning. My guess though is that accessing these constants through their std.c.T prefix rather than the std.os. prefixes would work. Possibly also on Apple's platforms?
I'll do some further testing on my side before opening a pull-request. Do you @kylecarbs, being the author of the Darwin comment and the Linux specific fallback, see any potential issues worth discussing before then?
Firstly, I find boo to be promising lovely project. Thanks for creating it, and publishing it under a permissive license!
If attempting to build on FreeBSD (e.g. 15.0-RELEASE) the compilation fails with an unsupported OS error message.
The following trivial patch makes the build problem go away, and after applying it seems I'm also able to launch a boo session, detach and reattach it successfully.
It would be neat to provide a pull request instead of merely a bug report. However I'd much rather the right fix rather than a* fix be applied.
As we can learn from OpenBSD Porter's Handbook, its better to Test for features, not for specific OSes.
My experience with ziglang is limited to only what I've learned by building boo this morning. My guess though is that accessing these constants through their
std.c.Tprefix rather than thestd.os.prefixes would work. Possibly also on Apple's platforms?I'll do some further testing on my side before opening a pull-request. Do you @kylecarbs, being the author of the Darwin comment and the Linux specific fallback, see any potential issues worth discussing before then?