According to FreeBSD style(9) and OpenBSD style(9) either <sys/types.h> or <sys/param.h> must come before any other header. Many system headers are not self-sufficient to avoid namespace pollution.
Found downstream via Rust
# FreeBSD $ echo '#include <machine/sysarch.h>' | cc -xc - In file included from <stdin>:1: In file included from /usr/include/machine/sysarch.h:42: /usr/include/machine/armreg.h:47:2: error: Please include sys/cdefs.h before including machine/armreg.h #error Please include sys/cdefs.h before including machine/armreg.h ^ 1 error generated. # OpenBSD $ echo '#include <machine/sysarch.h>' | cc -xc - In file included from <stdin>:1: /usr/include/machine/sysarch.h:47: error: expected specifier-qualifier-list before 'u_int32_t' In file included from <stdin>:1: /usr/include/machine/sysarch.h:56: error: expected ')' before 'addr'