Revision 167815 changes HW_NCPU to HW_AVAILCPU, which causes build failure on FreeBSD with the following message: /home/lantw44/gnome/source/webkit-trunk/Source/WTF/wtf/NumberOfCores.cpp:56:13: error: use of undeclared identifier 'HW_AVAILCPU' HW_AVAILCPU ^ /home/lantw44/gnome/source/webkit-trunk/Source/WTF/wtf/NumberOfCores.cpp:58:43: error: invalid application of 'sizeof' to an incomplete type 'int []' int sysctlResult = sysctl(name, sizeof(name) / sizeof(int), &result, &length, 0, 0); ^~~~~~ 2 errors generated. I run `grep -r HW_AVAILCPU /usr/include` on FreeBSD, NetBSD, OpenBSD, and there is no HW_AVAILCPU.
Created attachment 230810 [details] Patch It looks like it should be done using sysconf() as well, like we do in Linux: http://www.freebsd.org/cgi/man.cgi?query=sysconf&sektion=3&n=1 http://www.openbsd.org/cgi-bin/man.cgi?query=sysconf&sektion=3&format=html http://netbsd.gw.com/cgi-bin/man-cgi?sysconf++NetBSD-current Can someone try this patch?
(In reply to comment #1) > Created an attachment (id=230810) [details] > Patch > > It looks like it should be done using sysconf() as well, like we do in Linux: > > http://www.freebsd.org/cgi/man.cgi?query=sysconf&sektion=3&n=1 > http://www.openbsd.org/cgi-bin/man.cgi?query=sysconf&sektion=3&format=html > http://netbsd.gw.com/cgi-bin/man-cgi?sysconf++NetBSD-current > > Can someone try this patch? #include <unistd.h> is needed to use this patch on FreeBSD.
Created attachment 230819 [details] Patch > #include <unistd.h> is needed to use this patch on FreeBSD. Right, here's the updated version.
Comment on attachment 230819 [details] Patch r=me
This patch fixes the build problem on FreeBSD.
Committed r168353: <http://trac.webkit.org/changeset/168353>