svn commit: r378563 - in head/www/chromium: . files
Jan Beich
jbeich at FreeBSD.org
Sat Feb 7 00:10:54 UTC 2015
Jan Beich <jbeich at FreeBSD.org> writes:
>> ++# elif __FreeBSD_version__ < 900031
>
> Have you made sure __FreeBSD_version__ is defined?
Also, __FreeBSD_version has no underscores at the end.
>
>> ++ return 0; /* ! */
>
> Maybe replace with
>
> #include <sys/thr.h>
> ...
> long lwpid;
> thr_self(&lwpid);
> return static_cast<int>(lwpid);
Attached in a patch form. I haven't actually tested it builds.
Index: www/chromium/files/patch-v8__src__base__platform__platform-posix.cc
===================================================================
--- www/chromium/files/patch-v8__src__base__platform__platform-posix.cc (revision 378569)
+++ www/chromium/files/patch-v8__src__base__platform__platform-posix.cc (working copy)
@@ -1,17 +1,36 @@
--- v8/src/base/platform/platform-posix.cc.orig 2015-01-27 03:22:59.000000000 +0100
+++ v8/src/base/platform/platform-posix.cc 2015-02-06 18:41:53.881294389 +0100
-@@ -259,6 +259,14 @@
+@@ -54,6 +54,14 @@
+ #include <sys/prctl.h> // NOLINT, for prctl
+ #endif
+
++#if V8_OS_FREEBSD
++#include <osreldate.h> // for __FreeBSD_version
++#endif
++
++#if V8_OS_NETBSD
++#include <lwp.h> // for _lwp_self
++#endif
++
+ #if !V8_OS_NACL
+ #include <sys/syscall.h>
+ #endif
+@@ -259,6 +267,18 @@ int OS::GetCurrentThreadId() {
return static_cast<int>(syscall(__NR_gettid));
#elif V8_OS_ANDROID
return static_cast<int>(gettid());
++#elif V8_OS_DRAGONFLYBSD || defined(__DragonFly__)
++ return static_cast<int>(lwp_gettid());
+#elif V8_OS_FREEBSD
-+# ifdef __DragonFly__
-+ return static_cast<int>(lwp_gettid());
-+# elif __FreeBSD_version__ < 900031
-+ return 0; /* ! */
++# if __FreeBSD_version < 900031
++ long lwpid;
++ thr_self(&lwpid);
++ return static_cast<int>(lwpid);
+# else
+ return static_cast<int>(pthread_getthreadid_np());
+# endif
++#elif V8_OS_NETBSD
++ return static_cast<int>(_lwp_self());
#else
return static_cast<int>(pthread_self());
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 602 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20150207/b8d7de72/attachment.sig>
More information about the svn-ports-head
mailing list