You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Chris Nauroth (JIRA)" <ji...@apache.org> on 2015/03/16 22:13:39 UTC
[jira] [Resolved] (HADOOP-11638) OpensslSecureRandom.c
pthreads_thread_id should support FreeBSD and Solaris in addition to Linux
[ https://issues.apache.org/jira/browse/HADOOP-11638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Nauroth resolved HADOOP-11638.
------------------------------------
Resolution: Fixed
Fix Version/s: 2.7.0
I committed this to trunk, branch-2 and branch-2.7. Kiran, thank you for the patch.
bq. I would slightly prefer doing this in a new JIRA, since this one was already committed (and didn't mention Apple support in the description).
I had to revert the prior committed patch, because it actually broke compilation for Mac. That's why I reopened this issue and asked for a corrected patch.
> OpensslSecureRandom.c pthreads_thread_id should support FreeBSD and Solaris in addition to Linux
> ------------------------------------------------------------------------------------------------
>
> Key: HADOOP-11638
> URL: https://issues.apache.org/jira/browse/HADOOP-11638
> Project: Hadoop Common
> Issue Type: Bug
> Components: native
> Affects Versions: 2.6.0
> Reporter: Dmitry Sivachenko
> Assignee: Kiran Kumar M R
> Labels: freebsd
> Fix For: 2.7.0
>
> Attachments: HADOOP-11638-001.patch, HADOOP-11638-002.patch, HADOOP-11638-003.patch, HADOOP-11638-004.patch
>
>
> In OpensslSecureRandom.c you use Linux-specific syscall gettid():
> static unsigned long pthreads_thread_id(void)
> {
> return (unsigned long)syscall(SYS_gettid);
> }
> Man page says:
> gettid() is Linux-specific and should not be used in programs that are
> intended to be portable.
> This breaks hadoop-2.6.0 compilation on FreeBSD (may be on other OSes too).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)