title: 'O_RDONLY', `F_SETFL`, 'O_NONBLOCK' undeclared errors while following OpenGL tutorial
body: <p>I am currently learning modern OpenGl from the following website: <a href="http://www.arcsynthesis.org/gltut/Building%20the%20Tutorials.html" rel="nofollow">http://www.arcsynthesis.org/gltut/Building%20the%20Tutorials.html</a>.</p>
  
  <p>Unfortunately, when I follow the instructions to build the code examples, I fail.</p>
  
  <p>This is what happens:</p>
  
  <p>1- I run <strong>premake4 codeblocks</strong> in the glsdk directory.</p>
  
  <p>2- I open <strong>glsdk.workspace</strong> in code blocks.</p>
  
  <p>3- I go to Build -> Build workspace.</p>
  
  <p>4- I get the error:</p>
  
  <pre><code>/home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c In function ‘fghJoystickOpen’:|
  
  /home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1430|error: ‘O_RDONLY’ undeclared (first use in this function)|
  
  /home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1430|note: each undeclared identifier is reported only once for each function it appears in|
  
  /home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1448|error: ‘F_SETFL’ undeclared (first use in this function)|
  
  /home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1448|error: ‘O_NONBLOCK’ undeclared (first use in this function)|
  
  /home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c||In function ‘fghJoystickInit’:|
  
  /home/hani/Desktop/Tutorial 0.3.8/glsdk/freeglut/src/freeglut_joystick.c|1597|error: ‘F_OK’ undeclared (first use in this function)|
  
  ||=== Build failed: 4 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
  
  ||=== Build: Debug in glload (compiler: GNU GCC Compiler) ===|
  ||=== Build: Debug in glimg (compiler: GNU GCC Compiler) ===|
  ||=== Build: Debug in freeglut (compiler: GNU GCC Compiler) ===|
  </code></pre>
  
  <p>I am currently running Ubuntu 14.04.
  Help me solve this problem.</p>