audit: tweaks to make musl compat

+17 -1
+17 -1
pkgs/os-specific/linux/audit/default.nix
··· 1 1 { 2 - stdenv, buildPackages, fetchurl, 2 + stdenv, buildPackages, fetchurl, fetchpatch, 3 3 enablePython ? false, python ? null, 4 4 }: 5 5 ··· 27 27 28 28 enableParallelBuilding = true; 29 29 30 + patches = stdenv.lib.optional stdenv.hostPlatform.isMusl [ 31 + (fetchpatch { 32 + url = "https://git.alpinelinux.org/cgit/aports/plain/main/audit/0002-auparse-remove-use-of-rawmemchr.patch?id=3e57180fdf3f90c30a25aea44f57846efc93a696"; 33 + name = "0002-auparse-remove-use-of-rawmemchr.patch"; 34 + sha256 = "1caaqbfgb2rq3ria5bz4n8x30ihgihln6w9w9a46k62ba0wh9rkz"; 35 + }) 36 + (fetchpatch { 37 + url = "https://git.alpinelinux.org/cgit/aports/plain/main/audit/0003-all-get-rid-of-strndupa.patch?id=3e57180fdf3f90c30a25aea44f57846efc93a696"; 38 + name = "0003-all-get-rid-of-strndupa.patch"; 39 + sha256 = "1ddrm6a0ijrf7caw1wpw2kkbjp2lkxkmc16v51j5j7dvdalc6591"; 40 + }) 41 + ]; 42 + 43 + prePatch = '' 44 + sed -i 's,#include <sys/poll.h>,#include <poll.h>\n#include <limits.h>,' audisp/audispd.c 45 + ''; 30 46 meta = { 31 47 description = "Audit Library"; 32 48 homepage = http://people.redhat.com/sgrubb/audit/;