p11-glue / p11-kit

Provides a way to load and enumerate PKCS#11 modules.
https://p11-glue.github.io/p11-glue/p11-kit.html
Other
149 stars 91 forks source link

0.25.4 fails to compile on FreeBSD 14.0 (amd64) #643

Closed diizzyy closed 1 month ago

diizzyy commented 1 month ago
[  1% 11/350] cc -Icommon/libp11-common.a.p -Icommon -I../common -I. -I.. -fvisibility=hidden -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -D_GNU_SOURCE -DP11_KIT_FUTURE_UNSTABLE_API -O2 -pipe -march=tigerlake -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -MD -MQ common/libp11-common.a.p/hex.c.o -MF common/libp11-common.a.p/hex.c.o.d -o common/libp11-common.a.p/hex.c.o -c ../common/hex.c
FAILED: common/libp11-common.a.p/hex.c.o
cc -Icommon/libp11-common.a.p -Icommon -I../common -I. -I.. -fvisibility=hidden -fdiagnostics-color=never -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -D_GNU_SOURCE -DP11_KIT_FUTURE_UNSTABLE_API -O2 -pipe -march=tigerlake -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIC -MD -MQ common/libp11-common.a.p/hex.c.o -MF common/libp11-common.a.p/hex.c.o.d -o common/libp11-common.a.p/hex.c.o -c ../common/hex.c
../common/hex.c:58:7: error: use of undeclared identifier 'SIZE_MAX'
        if ((SIZE_MAX - 1) / 3 < n_data)
             ^
../common/hex.c:97:6: error: use of undeclared identifier 'SIZE_MAX'
        if (SIZE_MAX - 1 < hex_len ||
            ^
2 errors generated.

Adding #include <stdint.h> to common/hex.c fixes build

ueno commented 1 month ago

Thank you; would you like to file a PR to fix it?

diizzyy commented 1 month ago

Thanks!