Skip to content

uint64 type is 32 bit wide on i386 #3

@AMDmi3

Description

@AMDmi3

libfortuna compilation fails on FreeBSD 10.x i386:

./src/sha2.c:183:2: error: implicit conversion from 'unsigned long long' to 'uint64' (aka 'unsigned long') changes value from 4794697086780616226 to 3609767458 [-Werror,-Wconstant-conversion]
        0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
        ^~~~~~~~~~~~~~~~~~~~~

The cause is obvious from the error message: uint64 is typedef'ed as unsigned long, which is 32 bit on i386. This probably breaks the whole library. You should use standard u_int64_t type here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions