After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 736351 - Don't use issetugid() on Android
Don't use issetugid() on Android
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-09-09 18:19 UTC by Sebastian Dröge (slomo)
Modified: 2014-09-11 08:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gutils: Don't use issetugid() on Android (1.29 KB, patch)
2014-09-09 18:19 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2014-09-09 18:19:20 UTC
See attached patch, newer Android ABIs don't have it anymore but if compiled with an older version of the Android NDK the symbol is still found in the library.
Comment 1 Sebastian Dröge (slomo) 2014-09-09 18:19:47 UTC
Created attachment 285768 [details] [review]
gutils: Don't use issetugid() on Android

Android had it in older versions but the new 64 bit ABI does not
have it anymore, and some versions of the 32 bit ABI neither.

https://code.google.com/p/android-developer-preview/issues/detail?id=168
Comment 2 Sebastian Dröge (slomo) 2014-09-09 18:20:33 UTC
As a sidenote: It also always, unconditionally returned 0 on Android.
Comment 3 Colin Walters 2014-09-09 18:28:38 UTC
Review of attachment 285768 [details] [review]:

Can we instead change the configure check?  Something like:

diff --git a/configure.ac b/configure.ac
index 6e22fcb..b10874a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -516,6 +516,10 @@ AM_CONDITIONAL(OS_WIN32_AND_DLL_COMPILATION, [test x$glib_native_win32 = xyes -a
 # Checks for library functions.
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2 issetugid)
+AS_IF([test $glib_native_android = yes], [
+  ac_cv_func_issetugid=no
+])
+
 AC_CHECK_FUNCS(timegm gmtime_r)
 
 AC_CACHE_CHECK([for __libc_enable_secure], glib_cv_have_libc_enable_secure,

I'm fine with your patch is too if you prefer it.
Comment 4 Sebastian Dröge (slomo) 2014-09-09 18:44:20 UTC
I'm fine with both, whatever you prefer :) IMHO both are ugly but I can't think of a nicer solution
Comment 5 Colin Walters 2014-09-09 19:18:15 UTC
Review of attachment 285768 [details] [review]:

Yeah, I agree.  Since you have a (presumably) tested patch, let's just go with that then.
Comment 6 Sebastian Dröge (slomo) 2014-09-11 08:08:14 UTC
commit 012717f32c16596246d12fd70b26a58153ecaea5
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Sep 9 20:18:20 2014 +0200

    gutils: Don't use issetugid() on Android
    
    Android had it in older versions but the new 64 bit ABI does not
    have it anymore, and some versions of the 32 bit ABI neither.
    
    https://code.google.com/p/android-developer-preview/issues/detail?id=168
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736351