libfaketime: fix tests on loongarch64 and riscv64

This commit is contained in:
Weijia Wang
2025-05-28 14:09:15 +02:00
parent 76fa21447b
commit f204042a37
+10 -1
View File
@@ -49,7 +49,16 @@ stdenv.mkDerivation rec {
PREFIX = placeholder "out";
LIBDIRNAME = "/lib";
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=cast-function-type -Wno-error=format-truncation";
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.cc.isClang [
"-Wno-error=cast-function-type"
"-Wno-error=format-truncation"
]
# https://github.com/wolfcw/libfaketime/blob/6714b98794a9e8a413bf90d2927abf5d888ada99/README#L101-L104
++ lib.optionals (stdenv.hostPlatform.isLoongArch64 || stdenv.hostPlatform.isRiscV64) [
"-DFORCE_PTHREAD_NONVER"
]
);
nativeCheckInputs = [ perl ];