Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some POSIX types are missing on FreeBSD #7550

Closed
jbeich opened this issue Dec 25, 2020 · 0 comments · Fixed by #7599
Closed

Some POSIX types are missing on FreeBSD #7550

jbeich opened this issue Dec 25, 2020 · 0 comments · Fixed by #7599
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-freebsd standard library This issue involves writing Zig code for the standard library.
Milestone

Comments

@jbeich
Copy link

jbeich commented Dec 25, 2020

I'm trying to build river but it fails due to missing POSIX types often used by C libraries.

$ zig version
0.7.1+830bc41b1

$ cat test.zig
const std = @import("std");

pub fn main() anyerror!void {
    const foo = extern struct {
        dev: os.dev_t,
        server_start: std.os.time_t,
    };
}

$ zig build-exe test.zig
./test.zig:5:20: error: container 'std.os' has no member called 'dev_t'
        dev: std.os.dev_t,
                   ^
./test.zig:6:29: error: container 'std.os' has no member called 'time_t'
        server_start: std.os.time_t,
                            ^

struct stat seems to use plain type

Compare with NetBSD:

pub const dev_t = u64;

pub const time_t = i64;

dev: dev_t,

@Vexu Vexu added contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-freebsd standard library This issue involves writing Zig code for the standard library. labels Dec 28, 2020
@Vexu Vexu added this to the 0.8.0 milestone Dec 28, 2020
LemonBoy added a commit to LemonBoy/zig that referenced this issue Dec 29, 2020
LemonBoy added a commit to LemonBoy/zig that referenced this issue Dec 30, 2020
aarvay pushed a commit to aarvay/zig that referenced this issue Jan 4, 2021
dgbuckley pushed a commit to dgbuckley/zig that referenced this issue Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. os-freebsd standard library This issue involves writing Zig code for the standard library.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants