In https://reviews.freebsd.org/D19500 a proposal is made to create a symlink from /usr/include/sys/endian.h to /usr/include/endian.h. This causes issues with mesa-dri:
Use this PR to track progress on this issue.
Seems like this is an issue with our endian.h defining bswap32 (and friends), which also is defined in the mesa source. I've updated the differential with a comment as to how it seems to break, and why.