gmodule-dl: Use __ANDROID__ to test for the OS, not __BIONIC__

See https://android.googlesource.com/platform/bionic/+/HEAD/docs/defines.md
This commit is contained in:
L. E. Segovia 2024-04-02 08:43:00 -03:00
parent 6e664dbe33
commit 6e0632a29e

View File

@ -167,7 +167,7 @@ _g_module_self (void)
* NULL is given, dlsym returns an appropriate pointer. * NULL is given, dlsym returns an appropriate pointer.
*/ */
lock_dlerror (); lock_dlerror ();
#if defined(__BIONIC__) || defined(__NetBSD__) || defined(__FreeBSD__) #if defined(__ANDROID__) || defined(__NetBSD__) || defined(__FreeBSD__)
handle = RTLD_DEFAULT; handle = RTLD_DEFAULT;
#else #else
handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY); handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY);
@ -182,7 +182,7 @@ _g_module_self (void)
static void static void
_g_module_close (gpointer handle) _g_module_close (gpointer handle)
{ {
#if defined(__BIONIC__) || defined(__NetBSD__) || defined(__FreeBSD__) #if defined(__ANDROID__) || defined(__NetBSD__) || defined(__FreeBSD__)
if (handle != RTLD_DEFAULT) if (handle != RTLD_DEFAULT)
#endif #endif
{ {