diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index 6477ee3a4..1cfd25d9e 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -46,6 +46,15 @@ #include #include +#if defined(__BIONIC__) && (__ANDROID_API__ < 26) +#include +/* the shared object of recent bionic libc's have hasmntopt symbol, but + some a possible common build environment for android, termux ends + up with inssuficient __ANDROID_API__ value for building. +*/ +extern char* hasmntopt(const struct mntent* mnt, const char* opt); +#endif + #if HAVE_SYS_STATFS_H #include #endif diff --git a/gio/tests/basic-application.c b/gio/tests/basic-application.c index 362b2fd51..a58d812a5 100644 --- a/gio/tests/basic-application.c +++ b/gio/tests/basic-application.c @@ -74,10 +74,10 @@ activate (GApplication *application) } static void -open (GApplication *application, - GFile **files, - gint n_files, - const gchar *hint) +app_open (GApplication *application, + GFile **files, + gint n_files, + const gchar *hint) { gint i; @@ -249,7 +249,7 @@ main (int argc, char **argv) : G_APPLICATION_HANDLES_OPEN)); g_signal_connect (app, "startup", G_CALLBACK (startup), NULL); g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); - g_signal_connect (app, "open", G_CALLBACK (open), NULL); + g_signal_connect (app, "open", G_CALLBACK (app_open), NULL); g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL); #ifdef STANDALONE g_application_set_inactivity_timeout (app, 10000); diff --git a/gio/tests/gapplication-example-open.c b/gio/tests/gapplication-example-open.c index 6dcf53c22..0fc17bb20 100644 --- a/gio/tests/gapplication-example-open.c +++ b/gio/tests/gapplication-example-open.c @@ -15,10 +15,10 @@ activate (GApplication *application) } static void -open (GApplication *application, - GFile **files, - gint n_files, - const gchar *hint) +app_open (GApplication *application, + GFile **files, + gint n_files, + const gchar *hint) { gint i; @@ -45,7 +45,7 @@ main (int argc, char **argv) app = g_application_new ("org.gtk.TestApplication", G_APPLICATION_HANDLES_OPEN); g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); - g_signal_connect (app, "open", G_CALLBACK (open), NULL); + g_signal_connect (app, "open", G_CALLBACK (app_open), NULL); g_application_set_inactivity_timeout (app, 10000); status = g_application_run (app, argc, argv); diff --git a/gio/tests/gtlsconsoleinteraction.c b/gio/tests/gtlsconsoleinteraction.c index 8416574be..a0fee3d43 100644 --- a/gio/tests/gtlsconsoleinteraction.c +++ b/gio/tests/gtlsconsoleinteraction.c @@ -47,7 +47,7 @@ G_DEFINE_TYPE (GTlsConsoleInteraction, g_tls_console_interaction, G_TYPE_TLS_INT #define BUFSIZ 8192 #endif static gchar * -getpass (const gchar *prompt) +static_getpass (const gchar *prompt) { static gchar buf[BUFSIZ]; gint i; @@ -71,6 +71,9 @@ getpass (const gchar *prompt) return &buf[0]; } +#undef getpass +#define getpass static_getpass /* avoid overloading a potential + build environment defintion of getpass */ #endif static GTlsInteractionResult diff --git a/glib/tests/getpwuid-preload.c b/glib/tests/getpwuid-preload.c index f4197e690..17629cdef 100644 --- a/glib/tests/getpwuid-preload.c +++ b/glib/tests/getpwuid-preload.c @@ -25,6 +25,8 @@ #include #include +#undef getpwuid + static struct passwd my_pw; /* This is used in gutils.c used to make sure utility functions