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 689324 - Variable scoping in gunixmounts.c
Variable scoping in gunixmounts.c
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.34.x
Other Mac OS
: Normal minor
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-11-30 04:15 UTC by Daniel Macks
Modified: 2012-12-19 19:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add AC_CHECK_FUNCS(sysctlbyname) (719 bytes, patch)
2012-12-01 19:33 UTC, Daniel Macks
accepted-commit_now Details | Review

Description Daniel Macks 2012-11-30 04:15:00 UTC
While trying to figure out Bug #689323, I noticed my OS X 10.6 has sys/sysctl.h and sysctlbyname() but the #if defined(HAVE_SYSCTLBYNAME) branch in gunixmounts.c around line 1050 is not being used. Looks like ./configure isn't actually ever testing for the availability of that function.
Comment 1 Daniel Macks 2012-11-30 17:30:09 UTC
(sorry for the bad bug-title...cloned previous and bugzilla won't let me change it now)
Comment 2 Daniel Macks 2012-12-01 19:33:21 UTC
Created attachment 230405 [details] [review]
add AC_CHECK_FUNCS(sysctlbyname)

I browsed a bit of git history and can't find that this was *ever* done and the code that (might) use this function appears to have always had the #ifdef guard, so maybe this code branch has never been used? If so, not sure if (now that it is usable) it should be the first-choice preference rather than a last-chance #elif (manpages say that syscylbyname() lookup by string is slower than using sysctl() with the actual mib[] macros).
Comment 3 Matthias Clasen 2012-12-03 04:56:54 UTC

*** This bug has been marked as a duplicate of bug 689323 ***
Comment 4 Matthias Clasen 2012-12-03 04:57:39 UTC
oh,wrong
Comment 5 Matthias Clasen 2012-12-03 04:58:35 UTC
Review of attachment 230405 [details] [review]:

Looks fine to me