1 $NetBSD: patch-src_mesa_main_context.c,v 1.6 2022/03/13 15:52:50 tnn Exp $
3 atexit() is not a good idea in shared libraries.
5 --- src/mesa/main/context.c.orig 2021-07-14 20:04:58.296035000 +0000
6 +++ src/mesa/main/context.c
7 @@ -324,7 +324,11 @@ _mesa_destroy_visual( struct gl_config *
8 * Calls all the various one-time-fini functions in Mesa
11 +#if defined(HAVE_NOATEXIT)
12 +static void __attribute__((__destructor__))
18 glsl_type_singleton_decref();
19 @@ -357,7 +361,9 @@ one_time_init(void)
20 _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F;
23 +#if !defined(HAVE_NOATEXIT)
24 atexit(one_time_fini);
28 if (MESA_VERBOSE != 0) {