title: Cannot interpret compiler warning
body: <p>My compiler (gcc) throws warnings (not errors!) on the line which declares <code>fp</code>:</p>
  
  <pre><code>int fd = open("filename.dat", O_RDONLY);
  FILE* fp = fdopen(fd, "r"); // get a file pointer fp from the file descriptor fd
  </code></pre>
  
  <p>These are the warnings:</p>
  
  <pre><code>main.c: In function ‘main’:
  main.c:606: warning: implicit declaration of function ‘fdopen’
  main.c:606: warning: initialization makes pointer from integer without a cast
  </code></pre>
  
  <p>I do not understand these warnings since the return value of <code>fopen</code> is a <code>FILE*</code>. What is the mistake I am making here?</p>
  
  <p><strong>EDIT</strong>: I am including <code>stdio.h</code> (and I am also on Linux).</p>