diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-09-07 22:17:35 +0000 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-09 11:35:57 -0800 |
commit | 913998dda85c22051c08b30822e04bd1026226a4 (patch) | |
tree | 2cd2bf6dd629c75561c7ba02ed258bdf9a7b2092 | |
parent | 15ba0b1eab8c7276dabbe53a542488d77f7d8114 (diff) | |
download | libibverbs-913998dda85c22051c08b30822e04bd1026226a4.tar.gz |
Make sure __BYTE_ORDER is defined
Fail compilation if __BYTE_ORDER is neither __LITTLE_ENDIAN nor __BIG_ENDIAN.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
-rw-r--r-- | include/infiniband/arch.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/infiniband/arch.h b/include/infiniband/arch.h index e6eb8c8..147c3d0 100644 --- a/include/infiniband/arch.h +++ b/include/infiniband/arch.h @@ -44,6 +44,8 @@ static inline uint64_t ntohll(uint64_t x) { return bswap_64(x); } #elif __BYTE_ORDER == __BIG_ENDIAN static inline uint64_t htonll(uint64_t x) { return x; } static inline uint64_t ntohll(uint64_t x) { return x; } +#else +#error __BYTE_ORDER is neither __LITTLE_ENDIAN nor __BIG_ENDIAN #endif /* |