pulseaudio: fix dependencies for openssl-3
[oi-userland.git] / components / x11 / mesa / patches / patch-src_mesa_main_formats.c.patch
blobd96293f76abab1566593ae7ebae514a01fa40807
1 $NetBSD: patch-src_mesa_main_formats.c,v 1.1 2022/03/13 15:52:50 tnn Exp $
3 atexit() is not a good idea in shared libraries.
5 --- src/mesa/main/formats.c.orig 2021-07-14 20:04:58.323035200 +0000
6 +++ src/mesa/main/formats.c
7 @@ -451,7 +451,11 @@ _mesa_format_to_array_format(mesa_format
8 static struct hash_table *format_array_format_table;
9 static once_flag format_array_format_table_exists = ONCE_FLAG_INIT;
11 +#if defined(HAVE_NOATEXIT)
12 +static void __attribute__((__destructor__))
13 +#else
14 static void
15 +#endif
16 format_array_format_table_destroy(void)
18 _mesa_hash_table_destroy(format_array_format_table, NULL);
19 @@ -496,7 +500,9 @@ format_array_format_table_init(void)
20 (void *)(intptr_t)f);
23 +#if !defined(HAVE_NOATEXIT)
24 atexit(format_array_format_table_destroy);
25 +#endif
28 mesa_format