title: O_WRONLY undeclared (first use in this function)
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;sys/types.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;fcntl.h&gt;
  char data [ 6 ];
  main ( ) {
  int len;
  desc = open ( "Resultat", O_WRONLY | O_CREAT | O_EXCL, 0666 );
  if ( desc != -1 ) {
  len = write ( desc, &amp;data, sizeof ( data ) );
  if ( len != sizeof ( data ) )
  printf ( "ERROR" );
  } }
  </code></pre>
  
  <p>this is my code and i'm getting the error</p>
  
  <pre><code>O_WRONLY undeclared (first use in this function)
  O_CREAT undeclared (first use in this function)
  O_EXCL undeclared (first use in this function)
  </code></pre>
  
  <p>How do I fix that?</p>