#include <X11/Xlib.h> is portable, the local version of GCC simply doesn't look in /usr/X11R6, which was the default path on all Unix-like systems prior to the modularization of Xorg R7, OpenBSD retains this for portability reasons!

Developers can utilize pkg-config(1) or simply pass the proper -I, -L and -l arguments to GCC.