MacOS clang via Homebrew broken under Mojave `wchar.h`

Here's how I solved it (very dirty but has worked for a long time):

  1. Disabled SIP on my Mac
  2. Symlinked /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include to /usr/include as is expected in POSIX environments.
  3. Re-enabled SIP.

Now I got to make a note to re-do this everytime a new OSX update comes out. This has not broken anything wrt Xcode, clang (from brew) etc so I'll keep it. Be advised though, this might break your stuff.