librist: fix build for musl (#355235)

authored by Atemu and committed by GitHub c987152a be4d7aab

+18
+16
pkgs/by-name/li/librist/musl.patch
···
··· 1 + diff --git a/test/rist/unit/srp_examples.c b/test/rist/unit/srp_examples.c 2 + index 1c5193d..6f835b5 100644 3 + --- a/test/rist/unit/srp_examples.c 4 + +++ b/test/rist/unit/srp_examples.c 5 + @@ -16,6 +16,11 @@ 6 + #define DEBUG_USE_EXAMPLE_CONSTANTS 1 7 + 8 + #if HAVE_MBEDTLS 9 + +// musl's sched.h includes a prototype for calloc, so we need to make 10 + +// sure it's already been included before we redefine it to something 11 + +// that won't expand to a valid prototype. 12 + +#include <sched.h> 13 + + 14 + #define malloc(size) _test_malloc(size, __FILE__, __LINE__) 15 + #define calloc(num, size) _test_calloc(num, size, __FILE__, __LINE__) 16 + #define free(obj) _test_free(obj, __FILE__, __LINE__)
+2
pkgs/by-name/li/librist/package.nix
··· 24 patches = [ 25 # https://github.com/NixOS/nixpkgs/pull/257020 26 ./darwin.patch 27 ]; 28 29 nativeBuildInputs = [
··· 24 patches = [ 25 # https://github.com/NixOS/nixpkgs/pull/257020 26 ./darwin.patch 27 + # https://code.videolan.org/rist/librist/-/merge_requests/257 28 + ./musl.patch 29 ]; 30 31 nativeBuildInputs = [