libdrm: Add patch to fix musl build. Fixes #66441

(cherry picked from commit b577340eb5bc3b72549f0544b50e2e37df78bf12)

Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
This commit is contained in:
Niklas Hambüchen 2019-08-12 02:26:04 +02:00 committed by Matthew Bauer
parent 067b4dbb93
commit 23399ff012

View file

@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, pkgconfig, meson, ninja, libpthreadstubs, libpciaccess
, withValgrind ? valgrind-light.meta.available, valgrind-light
, withValgrind ? valgrind-light.meta.available, valgrind-light, fetchpatch
}:
stdenv.mkDerivation rec {
@ -17,7 +17,15 @@ stdenv.mkDerivation rec {
buildInputs = [ libpthreadstubs libpciaccess ]
++ lib.optional withValgrind valgrind-light;
patches = [ ./cross-build-nm-path.patch ];
patches = [ ./cross-build-nm-path.patch ] ++
lib.optionals stdenv.hostPlatform.isMusl [
# Fix tests not building on musl because they use the glibc-specific
# (non-POSIX) `ioctl()` type signature. See #66441.
(fetchpatch {
url = "https://raw.githubusercontent.com/openembedded/openembedded-core/30a2af80f5f8c8ddf0f619e4f50451b02baa22dd/meta/recipes-graphics/drm/libdrm/musl-ioctl.patch";
sha256 = "0rdmh4k5kb80hhk1sdhlil30yf0s8d8w0fnq0hzyvw3ir1mki3by";
})
];
postPatch = ''
for a in */*-symbol-check ; do