pulseaudio: fix dependencies for openssl-3
[oi-userland.git] / components / x11 / mesa / patches / patch-src_gallium_frontends_osmesa_osmesa.c.patch
blob7d0b65940df72690db6258a4fd4fdc22be15bb13
1 $NetBSD: patch-src_gallium_frontends_osmesa_osmesa.c,v 1.1 2022/03/13 15:52:50 tnn Exp $
3 atexit() is not a good idea in shared libraries.
5 --- src/gallium/frontends/osmesa/osmesa.c.orig 2021-07-14 20:04:55.420007000 +0000
6 +++ src/gallium/frontends/osmesa/osmesa.c
7 @@ -134,7 +134,11 @@ osmesa_st_get_param(struct st_manager *s
8 static struct st_manager *stmgr = NULL;
9 static struct st_api *stapi = NULL;
11 +#if defined(HAVE_NOATEXIT)
12 +static void __attribute__((__destructor__))
13 +#else
14 static void
15 +#endif
16 destroy_st_manager(void)
18 if (stmgr) {
19 @@ -151,8 +155,10 @@ destroy_st_manager(void)
20 static void
21 create_st_manager(void)
23 +#if !defined(HAVE_NOATEXIT)
24 if (atexit(destroy_st_manager) != 0)
25 return;
26 +#endif
28 stmgr = CALLOC_STRUCT(st_manager);
29 if (stmgr) {