pulseaudio: fix dependencies for openssl-3
[oi-userland.git] / components / x11 / mesa / patches / patch-src_drm-shim_drm__shim.c.patch
blob644374be8fd0590284cfc4e8fa752079e819f98f
1 $NetBSD: patch-src_drm-shim_drm__shim.c,v 1.1 2022/03/13 15:52:50 tnn Exp $
3 atexit() is not a good idea in shared libraries.
5 --- src/drm-shim/drm_shim.c.orig 2021-07-14 20:04:46.724922400 +0000
6 +++ src/drm-shim/drm_shim.c
7 @@ -162,7 +162,11 @@ drm_shim_override_file(const char *conte
8 override->contents = strdup(contents);
11 +#if defined(HAVE_NOATEXIT)
12 +static void __attribute__((__destructor__))
13 +#else
14 static void
15 +#endif
16 destroy_shim(void)
18 _mesa_set_destroy(opendir_set, NULL);
19 @@ -227,7 +231,9 @@ init_shim(void)
21 drm_shim_device_init();
23 +#if !defined(HAVE_NOATEXIT)
24 atexit(destroy_shim);
25 +#endif
28 /* Override libdrm's reading of various sysfs files for device enumeration. */