pulseaudio: fix dependencies for openssl-3
[oi-userland.git] / components / x11 / mesa / patches / patch-src_mesa_main_extensions.c.patch
blobf81644d90107f9056db28d4ed8eda14e9f5b7a4e
1 $NetBSD: patch-src_mesa_main_extensions.c,v 1.3 2022/03/13 15:50:05 tnn Exp $
3 atexit() is not a good idea in shared libraries.
5 FreeBSD reported atexit bug for 10.6:
6 https://bugs.freedesktop.org/show_bug.cgi?id=91869
8 --- src/mesa/main/extensions.c.orig 2021-07-14 20:04:58.316035000 +0000
9 +++ src/mesa/main/extensions.c
10 @@ -213,7 +213,11 @@ set_extension(struct gl_extensions *ext,
11 * This string is allocated early during the first context creation by
12 * _mesa_one_time_init_extension_overrides.
14 +#if defined(HAVE_NOATEXIT)
15 +static void __attribute__((__destructor__))
16 +#else
17 static void
18 +#endif
19 free_unknown_extensions_strings(void)
21 free(unrecognized_extensions.env);
22 @@ -304,7 +308,9 @@ _mesa_one_time_init_extension_overrides(
23 free(env);
24 } else {
25 unrecognized_extensions.env = env;
26 +#if !defined(HAVE_NOATEXIT)
27 atexit(free_unknown_extensions_strings);
28 +#endif