summaryrefslogtreecommitdiff
path: root/src/endianconv.h
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-12-11 17:01:00 +0100
committerantirez <antirez@gmail.com>2012-12-11 17:01:00 +0100
commit705874e31db0196d8e1b23a28e8265dbdd2dc136 (patch)
tree68919d1d0f8b07490019d7a346881e8d5b5a084f /src/endianconv.h
parentbf0852e5ed56dfbe32e19d926f8d5cc76f750cc8 (diff)
downloadredis-705874e31db0196d8e1b23a28e8265dbdd2dc136.tar.gz
Fix config.h endianess detection to work on Linux / PPC64.
Config.h performs endianess detection including OS-specific headers to define the endianess macros, or when this is not possible, checking the processor type via ifdefs. Sometimes when the OS-specific macro is included, only __BYTE_ORDER is defined, while BYTE_ORDER remains undefined. There is code at the end of config.h endianess detection in order to define the macros without the underscore, but it was not working correctly. This commit fixes endianess detection fixing Redis on Linux / PPC64 and possibly other systems.
Diffstat (limited to 'src/endianconv.h')
-rw-r--r--src/endianconv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/endianconv.h b/src/endianconv.h
index f76e0e6b3..7afe61c62 100644
--- a/src/endianconv.h
+++ b/src/endianconv.h
@@ -33,6 +33,7 @@
#ifndef __ENDIANCONV_H
#define __ENDIANCONV_H
+#include "config.h"
#include <stdint.h>
void memrev16(void *p);