title: undefined references to inline function
body: <p>My code is like this:</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  #include &lt;signal.h&gt;
  
  inline void func()
  {
      return;
  }
  
  int main(int argc, char const *argv[])
  {
      func();
      sigset_t oldset;
  }
  </code></pre>
  <p>If I use the command <code>gcc main.c</code> to compile, I got following error:</p>
  <blockquote>
  <p>main.c:(.text+0x2d): undefined reference to `func'</p>
  <p>collect2: error: ld returned 1 exit status</p>
  </blockquote>
  <p>I guess that <code>inline</code> is a feature of c99. So I added &quot;<code>-std=c99</code>&quot;, then I got this:</p>
  <blockquote>
  <p>$ gcc main.c -std=c99</p>
  <p>main.c:13:2: error: unknown type name ‘sigset_t’</p>
  </blockquote>
  <p>How can I get both <code>inline</code> and <code>sigset_t</code> to work?</p>