aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2016-05-14 08:44:37 -0400
committerJohn Szakmeister <john@szakmeister.net>2016-05-14 12:47:20 -0400
commitd3a904309b8a685ebb0540c04f8825b2dda3e4ff (patch)
tree694932003d28afd33c4992b743ef68914865e82b /src
parentd02cfe80618bb85cc1cc4a19a9cfc69ae64b98af (diff)
downloadrneovim-d3a904309b8a685ebb0540c04f8825b2dda3e4ff.tar.gz
rneovim-d3a904309b8a685ebb0540c04f8825b2dda3e4ff.tar.bz2
rneovim-d3a904309b8a685ebb0540c04f8825b2dda3e4ff.zip
Fix be64toh() detection on BSDs.
This was noticed due to a user issue (#4750) when building Neovim 0.1.4 via ports. The crux of the issue is that we did not detect the be64toh() macro, because there is no endian.h on FreeBSD (along with several other BSDs). So we were defaulting to our builtin version of be64toh(). However, it appears that sys/endian.h was being picked up by an include (likely msgpack.h) and so be64toh() was actually defined and corrupting our definition of it. So the answer here was to use the correct include file in our check, and export that information in the config.h. Then we use that information to include the right header in shada.c. This fixes #4750.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/shada.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/shada.c b/src/nvim/shada.c
index 3192be1b3c..51c8597d53 100644
--- a/src/nvim/shada.c
+++ b/src/nvim/shada.c
@@ -46,7 +46,7 @@
#ifdef HAVE_BE64TOH
# define _BSD_SOURCE 1
# define _DEFAULT_SOURCE 1
-# include <endian.h>
+# include ENDIAN_INCLUDE_FILE
#endif
// Note: when using bufset hash pointers are intentionally casted to uintptr_t