wlroots: backport patch for free() of ununitialized
This cherrypicks an upstream-but-unreleased commit for the following build failure. Strangely, this warning is not emittted on x86_64. FAILED: libwlroots.so.11.p/render_egl.c.o gcc -Ilibwlroots.so.11.p -I. -I.. -Iinclude -I../include -Iprotocol -I../protocol -Irender/gles2/shaders -Irender/vulkan/shade ../render/egl.c: In function 'egl_init_display': ../render/egl.c:179:17: error: 'external_only' may be used uninitialized in this function [-Werror=maybe-uninitialized] 179 | free(external_only); | ^~~~~~~~~~~~~~~~~~~ ../render/egl.c:128:29: note: 'external_only' was declared here 128 | EGLBoolean *external_only; | ^~~~~~~~~~~~~ ../render/egl.c:178:17: error: 'modifiers' may be used uninitialized in this function [-Werror=maybe-uninitialized] 178 | free(modifiers); | ^~~~~~~~~~~~~~~ ../render/egl.c:127:27: note: 'modifiers' was declared here 127 | uint64_t *modifiers; | ^~~~~~~~~ cc1: all warnings being treated as errors
This commit is contained in:
parent
cfb180c2f0
commit
9e2e7f3bc2
@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitLab
|
||||
, fetchpatch2
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
@ -27,7 +28,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
generic = { version, hash, extraBuildInputs ? [ ], extraNativeBuildInputs ? [ ], extraPatch ? "" }:
|
||||
generic = { version, hash, extraBuildInputs ? [ ], extraNativeBuildInputs ? [ ], extraPatch ? "", patches ? [ ] }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wlroots";
|
||||
inherit version;
|
||||
@ -40,6 +41,7 @@ let
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
inherit patches;
|
||||
postPatch = extraPatch;
|
||||
|
||||
# $out for the library and $examples for the example programs (in examples):
|
||||
@ -129,6 +131,13 @@ rec {
|
||||
substituteInPlace backend/drm/meson.build \
|
||||
--replace /usr/share/hwdata/ ${hwdata}/share/hwdata/
|
||||
'';
|
||||
patches = [
|
||||
(fetchpatch2 {
|
||||
# render/egl: fix uninitialized pointers in init_dmabuf_formats
|
||||
url = "https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/ed71915742160f2b9157adbad79364e22ab7ebda.patch";
|
||||
hash = "sha256-nNE+mBfLG3Q8PC3ly8GZXQZcoIoBLbcet7nxip6Ut0w=";
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
wlroots = wlroots_0_15;
|
||||
|
Loading…
Reference in New Issue
Block a user