[ 
https://issues.apache.org/jira/browse/HADOOP-11638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14349271#comment-14349271
 ] 

Kiran Kumar M R commented on HADOOP-11638:
------------------------------------------

[~aw], I quoted wine source code for reference. Not to use their code as-is. 
BTW wine is under LGPL.
You can find similar approach to get platform specific thread id in lots of 
other implementations also. I hope there should not be any license issues for 
the patch.

[~trtrmitya], In my opinion we should include platform specific code that we 
can actually compile and test on. Adding Solaris specific code is possible, I 
have also seen few JIRA related to that. But not sure who can compile and 
verify on Solaris. Did FreeBSD specific code work for you?

Let me know if Solaris specific code is needed.




> Linux-specific gettid() used in OpensslSecureRandom.c
> -----------------------------------------------------
>
>                 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
>         Attachments: HADOOP-11638-001.patch, HADOOP-11638-002.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)

Reply via email to