title: ARM Cross Compilation error using fcntl.h : error: 'close' was not declared in this scope
body: <p>I am cross compiling (host: x86 linux) for raspberry pi (ARM) using</p>
  
  <pre><code>arm-bcm2708hardfp-linux-gnueabi-g++
  </code></pre>
  
  <p>When I choose g++ it all works out fine and compiles.
  But when cross compiling I get:</p>
  
  <pre><code> error: 'close' was not declared in this scope
  </code></pre>
  
  <p>This is the simplified source code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fcntl.h&gt;
  
  using namespace std;
  int fd;
  
  int main() {
      cout &lt;&lt; "!!!Hello World!!!" &lt;&lt; endl; // prints !!!Hello World!!!
      close(fd);
      return 0;
  }
  </code></pre>
  
  <p>Any idea? Did I forget to include smth? I am using eclipse as IDE.</p>