Bug 75049 - get_nprocs_conf() is not portable
Summary: get_nprocs_conf() is not portable
Status: RESOLVED FIXED
Alias: None
Product: Zeitgeist
Classification: Unclassified
Component: libzeitgeist (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) FreeBSD
: medium normal
Assignee: zeitgeist-bugs@lists.freedesktop.org
QA Contact: zeitgeist-bugs@lists.freedesktop.org
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-16 10:51 UTC by Ting-Wei Lan
Modified: 2014-03-04 19:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Replace get_nprocs_conf with sysconf(_SC_NPROCESSORS_CONF) (1.14 KB, text/plain)
2014-02-16 10:51 UTC, Ting-Wei Lan
Details

Description Ting-Wei Lan 2014-02-16 10:51:36 UTC
Created attachment 94156 [details]
Replace get_nprocs_conf with sysconf(_SC_NPROCESSORS_CONF)

get_nprocs_conf is only available on GNU/Linux. According to the man pages, it is the same as sysconf(_SC_NPROCESSORS_CONF), so we should use it instead.
Comment 1 Ting-Wei Lan 2014-02-16 10:55:30 UTC
Comment on attachment 94156 [details]
Replace get_nprocs_conf with sysconf(_SC_NPROCESSORS_CONF)

Sorry, I found _SC_NPROCESSORS_CONF is also not standard. We should find a better way to replace get_nprocs_conf, and we cannot use this patch.
Comment 2 Antoine Jacoutot 2014-02-16 22:48:48 UTC
Sqme bug was opened there almost a year ago...
https://bugs.launchpad.net/libzeitgeist/+bug/1161565
(with a similar patch)
Comment 3 Allison Lortie (desrt) 2014-02-28 15:29:52 UTC
g_get_num_processors()
Comment 4 Seif Lotfy 2014-03-04 19:57:21 UTC
pushed fix to master


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.