summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorhubslave <29800872+hubslave@users.noreply.github.com>2018-02-26 00:07:05 +0200
committerGitHub <noreply@github.com>2018-02-26 00:07:05 +0200
commit4ae48e10e57dbc91f28dc3b804462e90dec063d0 (patch)
treebc335faaa667a812feeaf7c6e72b7dab3080410c /Source/Core
parentb289be43eb458c270506f114c78547e6517953a8 (diff)
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.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Swap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Common/Swap.h b/Source/Core/Common/Swap.h
index 6274ce19cc..c5b143dbcb 100644
--- a/Source/Core/Common/Swap.h
+++ b/Source/Core/Common/Swap.h
@@ -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"