title: Incompatible implicit declaration of built-in function ‘malloc’
body: <p>I'm getting this error:</p>
  
  <blockquote>
    <p>warning: incompatible implicit declaration of built-in function ‘malloc’</p>
  </blockquote>
  
  <p>I am trying to do this:</p>
  
  <pre><code>fileinfo_list* tempList = malloc(sizeof(fileinfo_list));
  </code></pre>
  
  <p>Just for the reference the struct used at hand is:</p>
  
  <pre><code>typedef struct {
      fileinfo** filedata;
      size_t nFiles;
      size_t size;
      size_t fileblock;
  } fileinfo_list;
  </code></pre>
  
  <p>I don't see anything wrong with what I've done. I'm just creating a <code>tempList</code> with the size of 1 x <code>fileinfo_list</code>.</p>