summaryrefslogtreecommitdiff
path: root/lib/libGL/mesa/_atexit.c
blob: 5e2e7f03fc2e52393a4d8c937e638a3a9d7e3fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/**
 ** Hack for OpenBSD atexit
 ** Author:  Matthew Dempsky <matthew@dempsky.org>
 **/
extern int __cxa_atexit(void (*)(void *), void *, void *);
extern void *__dso_handle;

int __attribute__((visibility("hidden")))
atexit(void (*fn)(void))
{
   return (__cxa_atexit((void (*)(void *))fn, 0, &__dso_handle));
}