Include <endian.h> for byte swap macros on OpenBSD

There is code below that assumes the presence of those macros (by #undef'ing them), but none of the included headers provided them.

This fixes a build failure on OpenBSD where the undef'd macros _do_ get picked up later on in a compilation unit (through which include, I don't know), and thus shadow the Common::swap* functions.
This commit is contained in:
hubslave 2018-02-26 00:07:05 +02:00 committed by GitHub
parent b289be43eb
commit 4ae48e10e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -13,6 +13,8 @@
#include <byteswap.h>
#elif defined(__FreeBSD__)
#include <sys/endian.h>
#elif defined(__OpenBSD__)
#include <endian.h>
#endif
#include "Common/CommonTypes.h"