title: cfmakeraw implicit declaration error
body: <p>I am writing multithread application (as homework). One of those threads is dedicated for reading keyboard presses, so using terminal in raw mode. But I keep getting error</p>
  
  <pre><code>error: implicit declaration of function ‘cfmakeraw’ [-Werror=implicit-function-declaration]
       cfmakeraw(&amp;tio);
  </code></pre>
  
  <p>even though I have <strong>unistd.h</strong> and <strong>termios.h</strong> included.</p>
  
  <p>I am programming on Linux (xubuntu 16.04) using gcc 5.4.0 with -std=c99 flag. The code looks something like:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdbool.h&gt;
  #include &lt;unistd.h&gt;
  #include &lt;termios.h&gt;
  #include &lt;pthread.h&gt;
  
  #include "prg_serial_nonblock.h"
  
  void set_raw(_Bool set);
  
  int main(int argc, char *argv[]) {
      // terminal raw mode
      set_raw(true);
  
      // ... some thread magic ...
  
      set_raw(false);
      printf("\n");
  }
  
  void set_raw(_Bool set) {
      static struct termios tio, tioOld;
      tcgetattr(STDIN_FILENO, &amp;tio);
  
      if (set) { // put the terminal to raw
          tioOld = tio; //backup
          cfmakeraw(&amp;tio);
          tio.c_lflag &amp;= ~ECHO; // assure echo is disabled
          tcsetattr(STDIN_FILENO, TCSANOW, &amp;tio);
      }
      else {      // set the previous settingsreset
          tcsetattr(STDIN_FILENO, TCSANOW, &amp;tioOld);
      }
  }
  </code></pre>