Skip to content

integer value cannot be coerced to type 'c_long' in os.nanosleep() #8488

Description

@s-ol
$ zig build
D:\Program Files\zig\lib\std\os.zig:4282:67: error: integer value 9223372036854775807 cannot be coerced to type 'c_long'
        .tv_nsec = math.cast(isize, nanoseconds) catch math.maxInt(isize),

The function is invoked simply as std.os.nanosleep(0, 250_000_000);

$ zig version
0.7.1

I downloaded zig-windows-x86_64-0.7.1.zip from the zig website.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavioros-windowsMicrosoft Windowsstandard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions