Date: Sat, 07 Feb 2015 01:13:43 +0100 From: Jan Beich <jbeich@FreeBSD.org> To: Rene Ladan <rene@FreeBSD.org> Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, John Marino <marino@FreeBSD.org>, ports-committers@freebsd.org Subject: Re: svn commit: r378563 - in head/www/chromium: . files Message-ID: <61be-h93c-wny@FreeBSD.org> In-Reply-To: <pp9m-h9ib-wny@FreeBSD.org> (Jan Beich's message of "Sat, 07 Feb 2015 01:04:44 %2B0100") References: <201502062228.t16MSqq8072725@svn.freebsd.org> <lhka-ipcv-wny@vfemail.net> <pp9m-h9ib-wny@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Sorry, typos creep in... <#secure method=pgpmime mode=sign> Jan Beich <jbeich@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. Missed sys/thr.h and probably better to use sys/param.h in case someone adds GNU/kFreeBSD support. 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,37 @@ --- 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,15 @@ + #include <sys/prctl.h> // NOLINT, for prctl + #endif + ++#if V8_OS_FREEBSD ++#include <sys/param.h> // for __FreeBSD_version ++#include <sys/thr.h> // for thr_self ++#endif ++ ++#if V8_OS_NETBSD ++#include <lwp.h> // for _lwp_self ++#endif ++ + #if !V8_OS_NACL + #include <sys/syscall.h> + #endif +@@ -259,6 +268,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 ------------------------------------------------- VFEmail.net - http://www.vfemail.net ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61be-h93c-wny>