Title: [111195] trunk/Source/_javascript_Core
Revision
111195
Author
[email protected]
Date
2012-03-19 09:48:35 -0700 (Mon, 19 Mar 2012)

Log Message

Cross-platform processor core counter: fix build on FreeBSD.
https://bugs.webkit.org/show_bug.cgi?id=81482

Reviewed by Zoltan Herczeg.

The documentation of sysctl(3) shows that <sys/types.h> should be
included before <sys/sysctl.h> (sys/types.h tends to be the first
included header in general).

This should fix the build on FreeBSD and other systems where
sysctl.h really depends on types defined in types.h.

* wtf/NumberOfCores.cpp:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (111194 => 111195)


--- trunk/Source/_javascript_Core/ChangeLog	2012-03-19 16:46:02 UTC (rev 111194)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-03-19 16:48:35 UTC (rev 111195)
@@ -1,3 +1,19 @@
+2012-03-19  Raphael Kubo da Costa  <[email protected]>
+
+        Cross-platform processor core counter: fix build on FreeBSD.
+        https://bugs.webkit.org/show_bug.cgi?id=81482
+
+        Reviewed by Zoltan Herczeg.
+
+        The documentation of sysctl(3) shows that <sys/types.h> should be
+        included before <sys/sysctl.h> (sys/types.h tends to be the first
+        included header in general).
+
+        This should fix the build on FreeBSD and other systems where
+        sysctl.h really depends on types defined in types.h.
+
+        * wtf/NumberOfCores.cpp:
+
 2012-03-19  Jessie Berlin  <[email protected]>
 
         Windows build fix after r111129.

Modified: trunk/Source/_javascript_Core/wtf/NumberOfCores.cpp (111194 => 111195)


--- trunk/Source/_javascript_Core/wtf/NumberOfCores.cpp	2012-03-19 16:46:02 UTC (rev 111194)
+++ trunk/Source/_javascript_Core/wtf/NumberOfCores.cpp	2012-03-19 16:48:35 UTC (rev 111195)
@@ -27,8 +27,10 @@
 #include "NumberOfCores.h"
 
 #if OS(DARWIN) || OS(OPENBSD) || OS(NETBSD) || OS(FREEBSD)
+// sys/types.h must come before sys/sysctl.h because the latter uses
+// data types defined in the former. See sysctl(3) and style(9).
+#include <sys/types.h>
 #include <sys/sysctl.h>
-#include <sys/types.h>
 #elif OS(LINUX) || OS(AIX) || OS(SOLARIS)
 #include <unistd.h>
 #elif OS(WINDOWS)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to