Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-11638

OpensslSecureRandom.c pthreads_thread_id should support FreeBSD and Solaris in addition to Linux

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.7.0
    • native
    • Reviewed

    Description

      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).

      Attachments

        1. HADOOP-11638-004.patch
          1 kB
          Kiran Kumar M R
        2. HADOOP-11638-003.patch
          1 kB
          Kiran Kumar M R
        3. HADOOP-11638-002.patch
          1 kB
          Kiran Kumar M R
        4. HADOOP-11638-001.patch
          1 kB
          Kiran Kumar M R

        Issue Links

          Activity

            People

              kiranmr Kiran Kumar M R
              trtrmitya Dmitry Sivachenko
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: