title: error: unknown type name 'pthread_mutex_t'
body: <p>Trying to compile a project and I am getting this error in thread.h.</p>
  
  <pre><code>inc/thread.h:38:15: error: unknown type name 'pthread_mutex_t'
  </code></pre>
  
  <p>When I look in thread.h, I see the following:</p>
  
  <pre><code>#include &lt;pthread.h&gt;
  #include "rel_assert.h"
  #define MUTEX pthread_mutex_t
  </code></pre>
  
  <p>It's the last line that is causing the error. 
  After searching I found the pthread_mutex_t struct definition in pthreadtypes.h, so I tried to include that. Then I the following error:</p>
  
  <p><code>inc/pthreadtypes.h:16:3: error: #error "Never include &lt;bits/pthreadtypes.h&gt; directly; use &lt;sys/types.h&gt; instead."
  inc/pthreadtypes.h:23:24: fatal error: bits/sched.h: No such file or directory
  compilation terminated.</code>    </p>
  
  <p>If I include <code>&lt;sys/types.h&gt;</code> instead, I am back to my original error.
  Any idea how to solve this.</p>
  
  <p>UPDATE1
  Tried to define it in the begining of my main like this: </p>
  
  <pre><code>#include &lt;pthread.h&gt;
  //#include &lt;libbladeRF.h&gt;
  #include &lt;sys/types.h&gt;
  
  int main()
  {
  
  pthread_mutex_t m;
  return 0;
  }
  </code></pre>
  
  <p>This actually works when I do a standalone c file and compile with gcc from the command line. But in the project I get errors. I must have done something wrong when I'm creating the project. Will try again.</p>