title: stdint.h include_next'd from stdint.h not found
body: <p>I have been putting together a m68k cross compile &quot;environment/toolchain&quot; of sorts for some upcoming projects I have planned, and I'm having an issue when using it on macOS (my native environment) specifically.</p>
  <p>If I follow my own instructions to install on Linux (<a href="https://github.com/tomstorey/m68k_bare_metal/blob/master/INSTALL-Debian-Ubuntu.md" rel="nofollow noreferrer">https://github.com/tomstorey/m68k_bare_metal/blob/master/INSTALL-Debian-Ubuntu.md</a>), then in my code I am able to use types such as <code>uint8_t</code> etc through <code>#include &lt;stdint.h&gt;</code>.</p>
  <p>But if I install on macOS and attempt to do the same thing I am greeted with this error:</p>
  <pre><code>In file included from main.c:1:
  /Users/tstorey/m68k/m68k-unknown-elf/lib/gcc/m68k-unknown-elf/9.3.0/include/stdint.h:9:16: fatal error: stdint.h: No such file or directory
      9 | # include_next &lt;stdint.h&gt;
        |                ^~~~~~~~~~
  compilation terminated.
  make: *** [main.o] Error 1
  </code></pre>
  <p>I've done a little searching around, but I'm not having much luck finding an answer, perhaps because I don't really know what to search for other than &quot;stdint.h not found&quot;.</p>
  <p>One topic I did find suggested that <code>include_next</code> shouldnt really be used, but that same person wouldnt recommended modifying the original <code>stdint.h</code> file to work around it. Presumably since in that case it is including <code>&lt;stdint.h&gt;</code> then this file should be located somewhere &quot;system wise&quot;, and <code>gcc</code> should know where to look to find it? But presumably that location doesnt exist.</p>
  <p>In the same directory where the the <code>stdint.h</code> file I am trying to include is located there is a <code>stdint-gcc.h</code> file which, if I include this in my code, it will compile fine, no worries.</p>
  <p>The original <code>stdint.h</code> file does seem to attempt to include this file, but only if <code>__STDC_HOSTED__</code> is not defined:</p>
  <pre><code>$ cat stdint.h
  #ifndef _GCC_WRAP_STDINT_H
  #if __STDC_HOSTED__
  # if defined __cplusplus &amp;&amp; __cplusplus &gt;= 201103L
  #  undef __STDC_LIMIT_MACROS
  #  define __STDC_LIMIT_MACROS
  #  undef __STDC_CONSTANT_MACROS
  #  define __STDC_CONSTANT_MACROS
  # endif
  # include_next &lt;stdint.h&gt;
  #else
  # include &quot;stdint-gcc.h&quot;
  #endif
  #define _GCC_WRAP_STDINT_H
  #endif
  </code></pre>
  <p>Sorry if this post is a bit wofty, but I am not experienced enough with <code>gcc</code> etc to really be able to work this out and I'm still learning a lot about setting all of this up, so I'm wondering if anyone knows what I have missed.</p>
  <p>Thanks</p>