[Bug 615357] [macosx] Handle multi-arch plugin-scanner

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Apr 11 15:37:16 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=615357
  GStreamer | gstreamer (core) | git

--- Comment #29 from Jeremy Huddleston <jeremyhu at freedesktop.org> 2011-04-11 22:37:13 UTC ---
Here's a snippet of code that I've used for runtime checks.  There may be
something better, but this works for me:

#define __OS_MAJOR_10_4  8
#define __OS_MAJOR_10_5  9
#define __OS_MAJOR_10_6 10
#define __OS_MAJOR_10_7 11

static int __os_major_version;

void some_initializer() {
    if (sysctlbyname("kern.osrelease", buf, &buf_n, NULL, 0) == -1) {
        perror("sysctl");
        __os_major_version = __OS_MAJOR_10_6; // Set to something reasonable
    } else {
        for(p=buf; *p && *p != '.'; p++);
        *p = '\0';
        __os_major_version = atoi(buf);
    }
}

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list