GNOME Bugzilla – Bug 689324
Variable scoping in gunixmounts.c
Last modified: 2012-12-19 19:32:11 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.
(sorry for the bad bug-title...cloned previous and bugzilla won't let me change it now)
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).
*** This bug has been marked as a duplicate of bug 689323 ***
oh,wrong
Review of attachment 230405 [details] [review]: Looks fine to me