title: pread and pwrite not defined?
body: <p>I am trying to use pread and pwrite so that I can lseek to the beginning of the file and start reading or writing in one atomic operation.  Both of these functions will do that for me however, the issue I am having is that the compiler is giving me <code>warning: implicit declaration of function ‘pread’</code> even after I added <code>#define _XOPEN_SOURCE 500</code> and <code>#include&lt;unistd.h&gt;</code> like the man pages said.  Am I missing something? The two statements with the function calls are below.
  Thanks!</p>
  
  <pre><code> #include&lt;unistd.h&gt;
  
  
  
   #define _XOPEN_SOURCE 500
      int main (int argc, char *argv[])
      {
  
  
  
  while ( (read_in += pread(source_fd, in_buf, in_buf_size,read_in) )  )
      {
  
  if (write_out += pwrite(dest_fd, in_buf, read_in, write_out) == -1)
          {
  </code></pre>