Sal.h missing when compiling windows project

The -gnu libc is shipped by zig, sal.h is included but as you discovered GAA_FLAG_SKIP_DNS_INFO is missing.

The -msvc libc is shipped by Microsoft Visual Studio. It includes sal.h and:

include/um/IPTypes.h
413:#define GAA_FLAG_SKIP_DNS_INFO                  0x0800

When running zig libc is sys_include_dir= populated? (sal.h must be in this folder)

If zig libc output for include and lib is not populated, run Visual Studio Installer and select from “Individual Components”:

  • “MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)” (or VS 2019)
    and
  • “Windows 10 SDK (10.0.20348.0)” (or later)