Broken SDK clang headers

I'm using MacOS Sonoma. My header files (located in /usr/local/include), which are symlinks to the SDKs found in /Library/Developer/CommandLineTools/SDKs/ emit a ton of '_Nullable'-errors like these:

/usr/local/include/stdio.h:386:6: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
FILE    *funopen(const void *,
        ^
/usr/local/include/stdio.h:386:6: note: insert '_Nullable' if the pointer may be null
FILE    *funopen(const void *,
        ^
          _Nullable
/usr/local/include/stdio.h:386:6: note: insert '_Nonnull' if the pointer should never be null
FILE    *funopen(const void *,
        ^
          _Nonnull

on both MacOSX14.0.sdk and MacOSX13.3.sdk. I found this problem here in the LLVM-issues too https://github.com/llvm/llvm-project/issues/54988 and it is fixed if i remove the central MacOSX.sdk symlink because then clang looks in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h for the headers and they don't contain these warnings. But I don't know how safe it is to just remove the MacOSX.sdk symlink because I would imagine that many other programs might depend on it. How can I either fix these header files or tell clang to look elsewhere without removing my MacOSX.sdk file which might mess up other things?

When you install a Command Line Tools package, it comes with a macOS SDK built-in, and the tools in the package automatically uses the headers and libraries in that SDK. Consider:

% cat "hello.c"           
#include <stdio.h>

int main(int argc, char ** argv) {
    printf("Hello Cruel World!\n");
    return 0;
}
% clang -o hello "hello.c"
% ./hello 
Hello Cruel World!

which works with no headers in either /usr or /usr/local :

% ls -l /usr    
total 0
lrwxr-xr-x    1 root  wheel     25 12 Oct 12:10 X11 -> ../private/var/select/X11
lrwxr-xr-x    1 root  wheel     25 12 Oct 12:10 X11R6 -> ../private/var/select/X11
drwxr-xr-x  936 root  wheel  29952 12 Oct 12:10 bin
drwxr-xr-x   32 root  wheel   1024 12 Oct 12:10 lib
drwxr-xr-x  338 root  wheel  10816 12 Oct 12:10 libexec
drwxr-xr-x    4 root  wheel    128 13 Nov 10:49 local
drwxr-xr-x  229 root  wheel   7328 12 Oct 12:10 sbin
drwxr-xr-x   42 root  wheel   1344 12 Oct 12:10 share
drwxr-xr-x    5 root  wheel    160 12 Oct 12:10 standalone
% 
% ls -l /usr/local 
total 0
drwxr-xr-x  11 root  wheel  352 25 Sep 10:26 bin
drwxr-xr-x   3 root  wheel   96  1 Apr  2020 share

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Broken SDK clang headers
 
 
Q